diff --git a/meshagent.js b/meshagent.js index 9efa434a..edb2d34b 100644 --- a/meshagent.js +++ b/meshagent.js @@ -83,7 +83,7 @@ module.exports.CreateMeshAgent = function (parent, db, ws, req, args, domain) { } } else { // 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 diff --git a/views/default.handlebars b/views/default.handlebars index a852dd77..83ab8de2 100644 --- a/views/default.handlebars +++ b/views/default.handlebars @@ -2588,6 +2588,7 @@ // Change the node connection state node.conn = message.event.conn; node.pwr = message.event.pwr; + node.lastconnect = Date.now(); // Web page update masterUpdate(4 | 16);