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

Catch asyncio.CancelledError when shutting down the server.

This commit is contained in:
grossmj 2018-08-28 17:10:24 +07:00
parent 00cf66fb0f
commit b7dd8b5176

View File

@ -72,7 +72,10 @@ class ServerHandler:
# then shutdown the server itself
from gns3server.web.web_server import WebServer
server = WebServer.instance()
asyncio_ensure_future(server.shutdown_server())
try:
asyncio_ensure_future(server.shutdown_server())
except asyncio.CancelledError:
pass
response.set_status(201)
@Route.get(