mirror of
https://github.com/jlu5/PyLink.git
synced 2025-02-25 18:00:39 +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.
|
except: # But don't allow it to crash the server.
|
||||||
log.exception('coremods.control: Error occurred in die() of plugin %s, skipping...', name)
|
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.
|
# Disconnect all our networks.
|
||||||
remove_network(ircobj)
|
remove_network(ircobj)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user