Skip to content

Commit 1983905

Browse files
elemoinechayim
andauthored
Catch OSError in BlockingConnectionPool.get_connection (#2001)
Co-authored-by: Chayim I. Kirshen <[email protected]>
1 parent fa76ac4 commit 1983905

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: redis/connection.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1577,7 +1577,7 @@ def get_connection(self, command_name, *keys, **options):
15771577
try:
15781578
if connection.can_read():
15791579
raise ConnectionError("Connection has data")
1580-
except ConnectionError:
1580+
except (ConnectionError, OSError):
15811581
connection.disconnect()
15821582
connection.connect()
15831583
if connection.can_read():

0 commit comments

Comments
 (0)