This commit is contained in:
lb 2024-01-03 15:09:59 +08:00
parent 0f56538c27
commit 678c1b86ed

View File

@ -13,6 +13,7 @@ class XClient {
name: string;
ws: WebSocket;
timeout: number = 1000 * 5;
heartbeatDelay: number = 1000 * 60 * 3;
reconnectCount: number = 0;
onmessage: (msg: MessageEvent) => void;
hb: number = 0;
@ -56,7 +57,7 @@ class XClient {
clearInterval(this.hb);
this.tryReconnect();
}
}, 1000 * 1);
}, this.heartbeatDelay);
}
tryReconnect() {