Skip to content

Commit

Permalink
Catch OSError in BlockingConnectionPool.get_connection (#2001)
Browse files Browse the repository at this point in the history
Co-authored-by: Chayim I. Kirshen <[email protected]>
  • Loading branch information
elemoine and chayim authored Feb 22, 2022
1 parent fa76ac4 commit 1983905
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion redis/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -1577,7 +1577,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():
Expand Down

0 comments on commit 1983905

Please sign in to comment.