Skip to content

Commit a1ee3df

Browse files
committed
fix retry for PubSub
1 parent 61293ff commit a1ee3df

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

redis/client.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2411,7 +2411,8 @@ def _execute(self, connection, command, *args):
24112411
return command(*args)
24122412
except (ConnectionError, TimeoutError) as e:
24132413
connection.disconnect()
2414-
if not connection.retry_on_timeout and isinstance(e, TimeoutError):
2414+
if (not connection.retry_on_timeout and
2415+
isinstance(e, TimeoutError)):
24152416
raise
24162417
# Connect manually here. If the Redis server is down, this will
24172418
# fail and raise a ConnectionError as desired.

0 commit comments

Comments
 (0)