mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Catch cancelled error when you Ctrl-C during server initalisation
Fix #820
This commit is contained in:
1 file changed
+1
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user