mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-27 21:19:31 +01:00
control: copy world.networkobjects to prevent RuntimeError
i.e.: RuntimeError: dictionary changed size during iteration
This commit is contained in:
parent
7c6daa839c
commit
8704114fa0
@ -25,7 +25,7 @@ def _shutdown(irc=None):
|
||||
except: # But don't allow it to crash the server.
|
||||
log.exception('coremods.control: Error occurred in die() of plugin %s, skipping...', name)
|
||||
|
||||
for ircobj in world.networkobjects.values():
|
||||
for ircobj in world.networkobjects.copy().values():
|
||||
# Disconnect all our networks.
|
||||
remove_network(ircobj)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user