mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-01-12 07:23:21 -05:00
Fixed device last seen date and time.
This commit is contained in:
parent
909838dfb6
commit
00746c5ae9
@ -83,7 +83,7 @@ module.exports.CreateMeshAgent = function (parent, db, ws, req, args, domain) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Update the last connect time
|
// Update the last connect time
|
||||||
if (obj.authenticated == 2) { db.Set({ _id: 'lc' + obj.dbNodeKey, type: 'lastconnect', domain: domain.id, time: obj.connectTime, addr: obj.remoteaddrport, cause: 1 }); }
|
if (obj.authenticated == 2) { db.Set({ _id: 'lc' + obj.dbNodeKey, type: 'lastconnect', domain: domain.id, time: Date.now(), addr: obj.remoteaddrport, cause: 1 }); }
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set this agent as no longer authenticated
|
// Set this agent as no longer authenticated
|
||||||
|
@ -2588,6 +2588,7 @@
|
|||||||
// Change the node connection state
|
// Change the node connection state
|
||||||
node.conn = message.event.conn;
|
node.conn = message.event.conn;
|
||||||
node.pwr = message.event.pwr;
|
node.pwr = message.event.pwr;
|
||||||
|
node.lastconnect = Date.now();
|
||||||
|
|
||||||
// Web page update
|
// Web page update
|
||||||
masterUpdate(4 | 16);
|
masterUpdate(4 | 16);
|
||||||
|
Loading…
Reference in New Issue
Block a user