[Core] Fix potential "dictionary changed size during iteration" on shutdown

This commit is contained in:
Anders Jensen 2019-11-03 16:02:37 +01:00 committed by Calum Lind
parent 20afc31f3c
commit ed4bc5fa17

View File

@ -448,7 +448,7 @@ class ComponentRegistry(object):
def on_stopped(result):
return DeferredList(
[comp._component_shutdown() for comp in self.components.values()]
[comp._component_shutdown() for comp in list(self.components.values())]
)
return self.stop(list(self.components)).addCallback(on_stopped)