Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions redis/asyncio/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -1445,7 +1445,7 @@ async def get_connection(self, command_name, *keys, **options):
try:
if await connection.can_read_destructive():
raise ConnectionError("Connection has data") from None
except ConnectionError:
except (ConnectionError, OSError):
await connection.disconnect()
await connection.connect()
if await connection.can_read_destructive():
Expand Down Expand Up @@ -1646,7 +1646,7 @@ async def get_connection(self, command_name, *keys, **options):
try:
if await connection.can_read_destructive():
raise ConnectionError("Connection has data") from None
except ConnectionError:
except (ConnectionError, OSError):
await connection.disconnect()
await connection.connect()
if await connection.can_read_destructive():
Expand Down