From d577fb135e8b1783514db2a3f6eda944f412e867 Mon Sep 17 00:00:00 2001 From: liamcottle Date: Tue, 30 Apr 2024 21:04:43 +1200 Subject: [PATCH] handle all connection closed exceptions --- web.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web.py b/web.py index cfd9850..fe25096 100644 --- a/web.py +++ b/web.py @@ -133,7 +133,7 @@ class ReticulumWebChat: message = await client.recv() data = json.loads(message) await self.on_websocket_data_received(client, data) - except websockets.ConnectionClosedOK: + except (websockets.ConnectionClosed, websockets.ConnectionClosedOK, websockets.ConnectionClosedError): # client disconnected, we can stop looping break except Exception as e: