diff --git a/redis/connection.py b/redis/connection.py index 8fdb4bdf8c..4178f67c57 100755 --- a/redis/connection.py +++ b/redis/connection.py @@ -1317,7 +1317,7 @@ def get_connection(self, command_name, *keys, **options): try: if connection.can_read(): raise ConnectionError("Connection has data") - except ConnectionError: + except (ConnectionError, OSError): connection.disconnect() connection.connect() if connection.can_read():