From f52a6f4ef955b8f89c454a650831c09a5234b94c Mon Sep 17 00:00:00 2001 From: John Smith Date: Sat, 6 Apr 2024 13:12:56 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=9E=E9=80=80=E9=A1=B9=E7=9B=AE=E5=BF=83?= =?UTF-8?q?=E8=B7=B3=E7=AD=96=E7=95=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/api/chat/ChatClientDirectOpenLive.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/frontend/src/api/chat/ChatClientDirectOpenLive.js b/frontend/src/api/chat/ChatClientDirectOpenLive.js index ecd45ed..e67100f 100644 --- a/frontend/src/api/chat/ChatClientDirectOpenLive.js +++ b/frontend/src/api/chat/ChatClientDirectOpenLive.js @@ -24,10 +24,6 @@ export default class ChatClientDirectOpenLive extends ChatClientOfficialBase { } stop() { - if (this.gameHeartbeatTimerId) { - window.clearTimeout(this.gameHeartbeatTimerId) - this.gameHeartbeatTimerId = null - } this.endGame() super.stop() @@ -52,6 +48,11 @@ export default class ChatClientDirectOpenLive extends ChatClientOfficialBase { content: '房间连接已断开' })) + if (this.gameHeartbeatTimerId) { + window.clearTimeout(this.gameHeartbeatTimerId) + this.gameHeartbeatTimerId = null + } + super.onWsClose() }