This commit is contained in:
zhangzheng
2026-02-28 18:29:30 +08:00
parent 53b9cc6aef
commit f9037ca05d

View File

@@ -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" }));