mirror of
https://github.com/GNS3/gns3-server.git
synced 2025-01-03 03:26:41 +00:00
Fixes module unload.
This commit is contained in:
parent
4848eeabad
commit
4f2764c0b4
@ -99,9 +99,10 @@ class BaseManager:
|
|||||||
|
|
||||||
for uuid in self._vms.keys():
|
for uuid in self._vms.keys():
|
||||||
try:
|
try:
|
||||||
self.delete_vm(uuid)
|
yield from self.delete_vm(uuid)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
log.warn("Could not delete VM {}: {}".format(uuid, e))
|
log.warn("Could not delete VM {}: {}".format(uuid, e))
|
||||||
|
continue
|
||||||
|
|
||||||
if hasattr(BaseManager, "_instance"):
|
if hasattr(BaseManager, "_instance"):
|
||||||
BaseManager._instance = None
|
BaseManager._instance = None
|
||||||
|
@ -80,7 +80,7 @@ class Server:
|
|||||||
for module in MODULES:
|
for module in MODULES:
|
||||||
log.debug("Unloading module {}".format(module.__name__))
|
log.debug("Unloading module {}".format(module.__name__))
|
||||||
m = module.instance()
|
m = module.instance()
|
||||||
m.unload()
|
self._loop.run_until_complete(m.unload())
|
||||||
self._loop.stop()
|
self._loop.stop()
|
||||||
|
|
||||||
def _signal_handling(self):
|
def _signal_handling(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user