diff --git a/WebApp/src/class/websockethandler.ts b/WebApp/src/class/websockethandler.ts index f054bda..455e1ea 100644 --- a/WebApp/src/class/websockethandler.ts +++ b/WebApp/src/class/websockethandler.ts @@ -343,7 +343,7 @@ function AddHeartbeat(ws: WebSocket){ if (now - (ws as any).lastActivity > 10000) { console.log('WebSocket connection timeout, closing...'); clearInterval((ws as any).heartbeatTimer); - //ws.close(); + ws.close(); } else { // 发送ping消息 ws.send(JSON.stringify({ type: "ping" }));