Graceful WebSocket disconnect and HF warning suppression in run.bat
This commit is contained in:
+1
-1
@@ -568,7 +568,7 @@ async def websocket_endpoint(websocket: WebSocket):
|
||||
if data == "ping":
|
||||
await websocket.send_text(json.dumps({"type": "pong"}))
|
||||
|
||||
except WebSocketDisconnect:
|
||||
except (WebSocketDisconnect, Exception):
|
||||
connected_clients.discard(websocket)
|
||||
logger.info(f"WebSocket client disconnected ({len(connected_clients)} total)")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user