Skip to content

Commit 443dbaf

Browse files
committed
Fix async retries
1 parent 0be8d52 commit 443dbaf

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

redis/asyncio/client.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,10 @@ async def _disconnect_raise(self, conn: Connection, error: Exception):
469469
is not a TimeoutError
470470
"""
471471
await conn.disconnect()
472-
if not (conn.retry_on_timeout and isinstance(error, TimeoutError)):
472+
if (
473+
conn.retry_on_error is None
474+
or isinstance(error, tuple(conn.retry_on_error)) is False
475+
):
473476
raise error
474477

475478
# COMMAND EXECUTION AND PROTOCOL PARSING

0 commit comments

Comments
 (0)