File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -1326,7 +1326,9 @@ async def initialize(self) -> None:
13261326 startup_nodes_reachable = False
13271327 fully_covered = False
13281328 exception = None
1329- for startup_node in self .startup_nodes .values ():
1329+ # Convert to tuple to prevent RuntimeError if self.startup_nodes
1330+ # is modified during iteration
1331+ for startup_node in tuple (self .startup_nodes .values ()):
13301332 try :
13311333 # Make sure cluster mode is enabled on this node
13321334 try :
Original file line number Diff line number Diff line change @@ -1674,7 +1674,9 @@ def initialize(self):
16741674 fully_covered = False
16751675 kwargs = self .connection_kwargs
16761676 exception = None
1677- for startup_node in self .startup_nodes .values ():
1677+ # Convert to tuple to prevent RuntimeError if self.startup_nodes
1678+ # is modified during iteration
1679+ for startup_node in tuple (self .startup_nodes .values ()):
16781680 try :
16791681 if startup_node .redis_connection :
16801682 r = startup_node .redis_connection
You can’t perform that action at this time.
0 commit comments