mirror of
https://github.com/IoTManagerProject/IoTManagerWeb.git
synced 2026-03-30 20:09:24 +03:00
some
This commit is contained in:
@@ -15,6 +15,7 @@
|
|||||||
//==================================constants section========================================
|
//==================================constants section========================================
|
||||||
let debug = true;
|
let debug = true;
|
||||||
let LOG_MAX_MESSAGES = 10;
|
let LOG_MAX_MESSAGES = 10;
|
||||||
|
let reconnectTimeout = 10000;
|
||||||
|
|
||||||
//=================================variable section==========================================
|
//=================================variable section==========================================
|
||||||
let myip = document.location.hostname;
|
let myip = document.location.hostname;
|
||||||
@@ -245,6 +246,7 @@
|
|||||||
});
|
});
|
||||||
socket[ws].addEventListener("message", function (event) {
|
socket[ws].addEventListener("message", function (event) {
|
||||||
let data = event.data.toString();
|
let data = event.data.toString();
|
||||||
|
if (debug) console.log("[i]", "data:", data);
|
||||||
if (data.includes("[log]")) {
|
if (data.includes("[log]")) {
|
||||||
data = data.replace("[log]", "");
|
data = data.replace("[log]", "");
|
||||||
addCoreMsg(data);
|
addCoreMsg(data);
|
||||||
@@ -277,7 +279,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function wsTestMsgTask() {
|
function wsTestMsgTask() {
|
||||||
setTimeout(wsTestMsgTask, 60000);
|
setTimeout(wsTestMsgTask, reconnectTimeout);
|
||||||
if (debug) console.log("[i]", "----timer tick----");
|
if (debug) console.log("[i]", "----timer tick----");
|
||||||
if (!flag) {
|
if (!flag) {
|
||||||
deviceList.forEach((device) => {
|
deviceList.forEach((device) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user