Skip to content

Commit 41cef47

Browse files
authored
get_connection: catch OSError too (#1832)
1 parent 9a8674a commit 41cef47

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

redis/connection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1317,7 +1317,7 @@ def get_connection(self, command_name, *keys, **options):
13171317
try:
13181318
if connection.can_read():
13191319
raise ConnectionError("Connection has data")
1320-
except ConnectionError:
1320+
except (ConnectionError, OSError):
13211321
connection.disconnect()
13221322
connection.connect()
13231323
if connection.can_read():

0 commit comments

Comments
 (0)