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

Fix rare race condition when stopping ubridge

Fix #887
This commit is contained in:
Julien Duponchelle 2017-01-31 13:43:05 +01:00
parent 580693b1ec
commit bfbc6ff0be
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

View File

@ -77,8 +77,11 @@ def wait_for_process_termination(process, timeout=10):
:param timeout: Timeout in seconds :param timeout: Timeout in seconds
""" """
if sys.version_info >= (3,5): if sys.version_info >= (3, 5):
try:
yield from asyncio.wait_for(process.wait(), timeout=timeout) yield from asyncio.wait_for(process.wait(), timeout=timeout)
except ProcessLookupError:
return
else: else:
while timeout > 0: while timeout > 0:
if process.returncode is not None: if process.returncode is not None: