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:
parent
00cf66fb0f
commit
b7dd8b5176
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user