mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-18 06:18:08 +00:00
Catch ConnectionResetError exception when client disconnects
This commit is contained in:
parent
bbb0a407e0
commit
77d4eabadc
@ -232,8 +232,7 @@ class Route(object):
|
||||
response.set_status(408)
|
||||
response.json({"message": "Request canceled", "status": 408})
|
||||
raise # must raise to let aiohttp know the connection has been closed
|
||||
except aiohttp.ClientError:
|
||||
log.warning("Client error")
|
||||
except (ConnectionResetError, aiohttp.ClientError):
|
||||
response = Response(request=request, route=route)
|
||||
response.set_status(408)
|
||||
response.json({"message": "Client error", "status": 408})
|
||||
|
Loading…
Reference in New Issue
Block a user