File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -1313,6 +1313,8 @@ async def initialize(self) -> None:
1313
1313
startup_nodes_reachable = False
1314
1314
fully_covered = False
1315
1315
exception = None
1316
+ # Convert to tuple to prevent RuntimeError if self.startup_nodes
1317
+ # is modified during iteration
1316
1318
for startup_node in tuple (self .startup_nodes .values ()):
1317
1319
try :
1318
1320
# Make sure cluster mode is enabled on this node
Original file line number Diff line number Diff line change @@ -1674,6 +1674,8 @@ def initialize(self):
1674
1674
fully_covered = False
1675
1675
kwargs = self .connection_kwargs
1676
1676
exception = None
1677
+ # Convert to tuple to prevent RuntimeError if self.startup_nodes
1678
+ # is modified during iteration
1677
1679
for startup_node in tuple (self .startup_nodes .values ()):
1678
1680
try :
1679
1681
if startup_node .redis_connection :
You can’t perform that action at this time.
0 commit comments