Report GNS3 VM errors to the GUI server summary. Ref #1359.

This commit is contained in:
grossmj committed 2018-08-28 15:42:06 +07:00
1 parent 8d4e73d23c
commit 00cf66fb0f
3 files changed
+25 -8

No files matched your search

+8 -2
View File
@@ -137,7 +137,10 @@ class WebServer:
def signal_handler(signame, *args):
log.warning("Server has got signal {}, exiting...".format(signame))
asyncio_ensure_future(self.shutdown_server())
try:
asyncio_ensure_future(self.shutdown_server())
except asyncio.CancelledError:
pass
signals = ["SIGTERM", "SIGINT"]
if sys.platform.startswith("win"):
@@ -295,4 +298,7 @@ class WebServer:
log.warning("TypeError exception in the loop {}".format(e))
finally:
if self._loop.is_running():
self._loop.run_until_complete(self.shutdown_server())
try:
self._loop.run_until_complete(self.shutdown_server())
except asyncio.CancelledError:
pass