mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-12 19:38:57 +00:00
Catch cancelled error when you Ctrl-C during server initalisation
Fix #820
This commit is contained in:
parent
4cd08c8955
commit
d16e3bb37b
@ -81,7 +81,7 @@ class WebServer:
|
||||
try:
|
||||
srv = self._loop.create_server(handler, self._host, self._port, ssl=ssl_context)
|
||||
self._server, startup_res = self._loop.run_until_complete(asyncio.gather(srv, self._app.startup(), loop=self._loop))
|
||||
except OSError as e:
|
||||
except (OSError, asyncio.CancelledError) as e:
|
||||
log.critical("Could not start the server: {}".format(e))
|
||||
return False
|
||||
return True
|
||||
|
Loading…
Reference in New Issue
Block a user