Skip to content

Commit d5e925b

Browse files
committed
Fix number of retries in async pipeline
1 parent 00f5be4 commit d5e925b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

redis/asyncio/cluster.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1480,7 +1480,9 @@ async def execute(
14801480
return []
14811481

14821482
try:
1483-
for _ in range(self._client.cluster_error_retry_attempts):
1483+
# Add one for the first execution
1484+
execute_attempts = 1 + self._client.cluster_error_retry_attempts
1485+
for _ in range(execute_attempts):
14841486
if self._client._initialize:
14851487
await self._client.initialize()
14861488

0 commit comments

Comments
 (0)