X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/ab48d029d97ece21ac9cb0609cdb7fe714733758..77b78dc401fc6fc144f43b740047cc09d8ab93fe:/client-libraries/python/redis.py diff --git a/client-libraries/python/redis.py b/client-libraries/python/redis.py index 881dfd1d..1787f171 100644 --- a/client-libraries/python/redis.py +++ b/client-libraries/python/redis.py @@ -880,6 +880,9 @@ class Redis(object): def get_response(self): data = self._read().strip() + if not data: + self.disconnect() + raise ConnectionError("Socket closed on remote end") c = data[0] if c == '-': raise ResponseError(data[5:] if data[:5] == '-ERR ' else data[1:])