From 6ced99925862b5397f4a864727d2771cfe58246d Mon Sep 17 00:00:00 2001 From: limengnan <420004014@qq.com> Date: Tue, 24 Jun 2025 11:03:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=89=8D=E7=AB=AFsrc/views/w?= =?UTF-8?q?ebsocket=E7=9B=AE=E5=BD=95=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/core-frontend/src/websocket/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/core-frontend/src/websocket/index.ts b/core/core-frontend/src/websocket/index.ts index df05ab5..d330f36 100644 --- a/core/core-frontend/src/websocket/index.ts +++ b/core/core-frontend/src/websocket/index.ts @@ -64,6 +64,7 @@ export default { }) }, error => { + disconnect() console.error('连接失败: ' + error) } ) @@ -80,11 +81,12 @@ export default { } ) } + stompClient = null } function initialize() { connection() - timeInterval = setInterval(() => { + const timeInterval = setInterval(() => { if (!isLoginStatus()) { disconnect() return