Sfoglia il codice sorgente

reactor:重连次数新增;

zhangchong 1 anno fa
parent
commit
707c8c9822
2 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 1 1
      src/layout/navBars/breadcrumb/telControl.vue
  2. 1 1
      src/utils/websocket.ts

+ 1 - 1
src/layout/navBars/breadcrumb/telControl.vue

@@ -1195,7 +1195,7 @@ const onClose = async (event: any) => {
 };
 // 重新链接呼叫中心
 let reconnectAttempts = 0; // 重连次数
-let maxReconnectAttempts = 10; // 最大重连次数
+let maxReconnectAttempts = 99; // 最大重连次数
 let reconnectInterval = 2; // 重连间隔
 const reConnect = async () => {
 	ElNotification({

+ 1 - 1
src/utils/websocket.ts

@@ -20,7 +20,7 @@ class Socket {
 		this.opts = {
 			heartbeatInterval: 2 * 1000, // 心跳间隔
 			reconnectInterval: 2 * 1000, // 重连间隔
-			maxReconnectAttempts: 10, // 最大重连次数
+			maxReconnectAttempts: 99, // 最大重连次数
 			isReconnect: true, // 是否需要重连
 			uid: '', // 用户id
 			subscribe: '', // 订阅的频道