From 77d4eabadcbceb904e26bace34cb229b950cf910 Mon Sep 17 00:00:00 2001 From: grossmj Date: Sat, 12 Aug 2023 17:31:58 +1000 Subject: [PATCH] Catch ConnectionResetError exception when client disconnects --- gns3server/web/route.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gns3server/web/route.py b/gns3server/web/route.py index 115d209c..4a7103a3 100644 --- a/gns3server/web/route.py +++ b/gns3server/web/route.py @@ -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})