Skip to content

Commit

Permalink
Fix shutdown error chaning the dict during the iteration.
Browse files Browse the repository at this point in the history
  • Loading branch information
dfalbel committed Apr 10, 2024
1 parent ae36eab commit 8523349
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ def shutdown(self):
"""
Closes all comms and runs the `disconnect` callback.
"""
for comm_id in self.comms.keys():
for comm_id in list(self.comms.keys()):
self._close_connection(comm_id)

self.comms = {} # implicitly deleting comms
Expand Down

0 comments on commit 8523349

Please sign in to comment.