From 1872d4c65681b74938828823cdc41d9483cf0e6c Mon Sep 17 00:00:00 2001
From: zjj <3272660260@qq.com>
Date: 星期五, 27 十二月 2024 14:18:51 +0800
Subject: [PATCH] #
---
Monitor-APP/static/js/WebSocketClient.js | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/Monitor-APP/static/js/WebSocketClient.js b/Monitor-APP/static/js/WebSocketClient.js
index 06585df..c8a5b6a 100644
--- a/Monitor-APP/static/js/WebSocketClient.js
+++ b/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;
// #璁℃椂鍣╥d
@@ -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}`);
}
}
--
Gitblit v1.9.1