mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-18 22:51:01 +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."""
|
"""Unsets the callback assigned to the given subdir, and return it."""
|
||||||
global http_servers
|
global http_servers
|
||||||
assert isinstance(http_servers, list)
|
assert isinstance(http_servers, list)
|
||||||
for server in http_servers:
|
for server in list(http_servers):
|
||||||
server.unhook(subdir)
|
server.unhook(subdir)
|
||||||
if len(server.callbacks) <= 0 and not configGroup.keepAlive():
|
if len(server.callbacks) <= 0 and not configGroup.keepAlive():
|
||||||
server.shutdown()
|
server.shutdown()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user