diff --git a/redis/asyncio/client.py b/redis/asyncio/client.py index 5a2c496661..9059a389b1 100644 --- a/redis/asyncio/client.py +++ b/redis/asyncio/client.py @@ -483,8 +483,8 @@ async def _send_command_parse_response(self, conn, command_name, *args, **option async def _disconnect_raise(self, conn: Connection, error: Exception): """ Close the connection and raise an exception - if retry_on_timeout is not set or the error - is not a TimeoutError + if retry_on_error is not set or the error + is not one of the specified error types """ await conn.disconnect() if (