Skip to content

Commit

Permalink
Catch OSError in BlockingConnectionPool.get_connection
Browse files Browse the repository at this point in the history
  • Loading branch information
elemoine committed Feb 18, 2022
1 parent e3c989d commit 47c7fed
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 @@ -1570,7 +1570,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 47c7fed

Please sign in to comment.