mm_os 2.5.3 → 2.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/core/com/mqtt/index.js
CHANGED
|
@@ -454,9 +454,7 @@ MQTT.prototype.update_online = async function() {
|
|
|
454
454
|
var dict = list[i].drives;
|
|
455
455
|
for (var clientid in dict) {
|
|
456
456
|
var o = dict[clientid];
|
|
457
|
-
if (o.online ===
|
|
458
|
-
list_offline.push(clientid);
|
|
459
|
-
} else {
|
|
457
|
+
if (o.online === 1) {
|
|
460
458
|
if (o.time_last) {
|
|
461
459
|
var cha = now - o.time_last;
|
|
462
460
|
if (cha > online_expires) {
|
|
@@ -469,6 +467,8 @@ MQTT.prototype.update_online = async function() {
|
|
|
469
467
|
} else {
|
|
470
468
|
list_online.push(clientid);
|
|
471
469
|
}
|
|
470
|
+
} else {
|
|
471
|
+
list_offline.push(clientid);
|
|
472
472
|
}
|
|
473
473
|
}
|
|
474
474
|
}
|