mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-24 17:28:08 +00:00
Fixes check if VPCS process is running.
This commit is contained in:
parent
7d8ff54c78
commit
ec6a761e04
@ -81,6 +81,7 @@ class VPCSVM(BaseVM):
|
||||
if isinstance(nio, NIOUDP):
|
||||
self.manager.port_manager.release_udp_port(nio.lport, self._project)
|
||||
|
||||
if self.is_running():
|
||||
self._terminate_process()
|
||||
|
||||
@asyncio.coroutine
|
||||
@ -264,7 +265,6 @@ class VPCSVM(BaseVM):
|
||||
def _terminate_process(self):
|
||||
"""Terminate the process if running"""
|
||||
|
||||
if self._process:
|
||||
log.info("Stopping VPCS instance {} PID={}".format(self.name, self._process.pid))
|
||||
if sys.platform.startswith("win32"):
|
||||
self._process.send_signal(signal.CTRL_BREAK_EVENT)
|
||||
@ -296,7 +296,7 @@ class VPCSVM(BaseVM):
|
||||
:returns: True or False
|
||||
"""
|
||||
|
||||
if self._process:
|
||||
if self._process and self._process.returncode is None:
|
||||
return True
|
||||
return False
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user