mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 05:09:23 +01:00
Don't mutate server list while iterating on it.
It causes hanging at bot/test stops.
This commit is contained in:
parent
656222e341
commit
40837dbda0
@ -468,7 +468,7 @@ def unhook(subdir):
|
||||
"""Unsets the callback assigned to the given subdir, and return it."""
|
||||
global http_servers
|
||||
assert isinstance(http_servers, list)
|
||||
for server in http_servers:
|
||||
for server in list(http_servers):
|
||||
server.unhook(subdir)
|
||||
if len(server.callbacks) <= 0 and not configGroup.keepAlive():
|
||||
server.shutdown()
|
||||
|
Loading…
Reference in New Issue
Block a user