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