Browse Source

修改心跳时间

xiang 6 years ago
parent
commit
edf60be5aa
2 changed files with 3 additions and 3 deletions
  1. 1 1
      chat/src/components/index.vue
  2. 2 2
      pc_chat/src/components/chat.vue

+ 1 - 1
chat/src/components/index.vue

@@ -550,7 +550,7 @@
 				/*****************websockt心跳变量*******************/
 				reconnectData: null,
 				lockReconnect: false,    //避免重复连接,因为onerror之后会立即触发 onclose
-				timeout: 5000,          //5s一次心跳检测
+				timeout: 40000,          //5s一次心跳检测
 				timeoutObj: null,
 				serverTimeoutObj: null,
 				waitingMsg: false, // 是否显示等待排队

+ 2 - 2
pc_chat/src/components/chat.vue

@@ -643,7 +643,7 @@
 				/*****************websockt心跳变量*******************/
 				reconnectData: null,
 				lockReconnect: false,    //避免重复连接,因为onerror之后会立即触发 onclose
-				timeout: 10000,          //10s一次心跳检测
+				timeout: 40000,          //10s一次心跳检测
 				timeoutObj: null,
 				serverTimeoutObj: null,
 
@@ -1623,7 +1623,7 @@
 						// console.log('------心跳检测close-------')
 						this.websock.close(); //如果 5秒之后我们没有收到 后台返回的心跳检测数据 断开socket,断开后会启动重连机制
 
-					}, 50000);
+					}, 40000);
 				}, this.timeout)
 			},