Skip to content

Commit

Permalink
feat:连接终端输出错误信息
Browse files Browse the repository at this point in the history
  • Loading branch information
li1553770945 committed Nov 24, 2024
1 parent 039a0e4 commit 4ef4d86
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/store/connectStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,12 @@ export const useConnectStore = defineStore("connect", () => {
}
};
const handleReconnect = (e:Event) => {
console.log("连接中断");
console.log(e);
stopHeartbeat(); // 清理心跳包定时器
ElNotification({
title: "连接失败",
message: `websocket连接中断:${e},正在进行第${retryCount.value}次重连`,
message: `websocket连接中断,正在进行第${retryCount.value}次重连`,
type: "error",
});
if (needReconnect.value == false || retryCount.value == 4 || curRoomId.value == "") {
Expand Down

0 comments on commit 4ef4d86

Please sign in to comment.