1111
This commit is contained in:
@@ -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" }));
|
||||
|
||||
Reference in New Issue
Block a user