mirror of
https://github.com/GNS3/gns3-server.git
synced 2025-01-18 07:23:47 +02: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
|
# then shutdown the server itself
|
||||||
from gns3server.web.web_server import WebServer
|
from gns3server.web.web_server import WebServer
|
||||||
server = WebServer.instance()
|
server = WebServer.instance()
|
||||||
asyncio_ensure_future(server.shutdown_server())
|
try:
|
||||||
|
asyncio_ensure_future(server.shutdown_server())
|
||||||
|
except asyncio.CancelledError:
|
||||||
|
pass
|
||||||
response.set_status(201)
|
response.set_status(201)
|
||||||
|
|
||||||
@Route.get(
|
@Route.get(
|
||||||
|
Loading…
Reference in New Issue
Block a user