fix shutdown iteration
This commit is contained in:
parent
d872152cc8
commit
341e254640
@ -337,7 +337,7 @@ class Services(object):
|
|||||||
for key, source in SdrService.getActiveSources().__dict__().items():
|
for key, source in SdrService.getActiveSources().__dict__().items():
|
||||||
Services.handlers[key] = ServiceHandler(source)
|
Services.handlers[key] = ServiceHandler(source)
|
||||||
else:
|
else:
|
||||||
for handler in Services.handlers.values():
|
for handler in list(Services.handlers.values()):
|
||||||
handler.shutdown()
|
handler.shutdown()
|
||||||
Services.handlers = {}
|
Services.handlers = {}
|
||||||
|
|
||||||
@ -358,9 +358,9 @@ class Services(object):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def stop():
|
def stop():
|
||||||
for handler in Services.handlers.values():
|
for handler in list(Services.handlers.values()):
|
||||||
handler.shutdown()
|
handler.shutdown()
|
||||||
Services.handlers = {}
|
Services.handlers = {}
|
||||||
for scheduler in Services.schedulers.values():
|
for scheduler in list(Services.schedulers.values()):
|
||||||
scheduler.shutdown()
|
scheduler.shutdown()
|
||||||
Services.schedulers = {}
|
Services.schedulers = {}
|
||||||
|
Loading…
Reference in New Issue
Block a user