1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-13 20:08:55 +00:00

Avoid dead lock if you can not close the GNS3VM at exit

This commit is contained in:
Julien Duponchelle 2016-08-29 13:53:53 +02:00
parent f93e443548
commit b7bf97039c
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

View File

@ -134,6 +134,9 @@ class VMwareGNS3VM(BaseGNS3VM):
if self._vmx_path is None:
raise GNS3VMError("No VMX path configured, can't stop the VM")
yield from self._execute("stop", [self._vmx_path, "soft"])
try:
yield from self._execute("stop", [self._vmx_path, "soft"])
except VMwareError as e:
log.warning("Error when stopping the VM: {}".format(str(e)))
log.info("GNS3 VM has been stopped")
self.running = False