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() {