Monitor-APP/static/js/WebSocketClient.js
@@ -8,9 +8,9 @@ // #重连次数 reconnectAttempts = 0; // #最大重连数 maxReconnectAttempts = 5; maxReconnectAttempts = 20; // #重连间隔 reconnectInterval = 10000; // 10 seconds reconnectInterval = 60000; // 10 seconds // #发送心跳数据间隔 heartbeatInterval = 1000 * 30; // #计时器id @@ -144,8 +144,9 @@ this.connect(); }, this.reconnectInterval); } else { this.closeHeartbeat(); this.log('WebSocket', `最大重连失败,终止重连: ${this.url}`); plus.runtime.restart(); // this.closeHeartbeat(); // this.log('WebSocket', `最大重连失败,终止重连: ${this.url}`); } }