Skip to content

Commit 94881c8

Browse files
authored
Merge pull request #53 from Dunedan/fix-dict-change-during-iteration
Fix possible runtime error when reconnecting
2 parents d7fd823 + 1326e8b commit 94881c8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

xpartamupp/modbot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ async def _reconnect(self, _) -> None:
373373
also cancels all running unmute tasks. These tasks are being
374374
rescheduled once a new connection got established.
375375
"""
376-
for key in self.unmute_tasks:
376+
for key in list(self.unmute_tasks):
377377
try:
378378
task = self.unmute_tasks.pop(key)
379379
except KeyError:

0 commit comments

Comments
 (0)