From 678c1b86edd3eebab1bd2605faf9ee14e7667548 Mon Sep 17 00:00:00 2001 From: lb Date: Wed, 3 Jan 2024 15:09:59 +0800 Subject: [PATCH] update --- src/utils/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/utils/index.ts b/src/utils/index.ts index 1b46123..ee986d2 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -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() {