1
0
Fork 0
mirror of https://github.com/Ylianst/MeshCentral.git synced 2025-03-09 15:40:18 +00:00

MeshCentral Router update, fixed backup links in non-default domain.

This commit is contained in:
Ylian Saint-Hilaire 2019-05-24 15:11:00 -07:00
parent 35ed079889
commit 5f3a020103
5 changed files with 12 additions and 8 deletions

View file

@ -220,6 +220,7 @@ module.exports.CreateMeshAgent = function (parent, db, ws, req, args, domain) {
parent.parent.taskLimiter.launch(function (argument, taskid, taskLimiterQueue) {
if (obj.authenticated != 2) { parent.parent.taskLimiter.completed(taskid); return; } // If agent disconnection, complete and exit now.
if (obj.nodeid != null) { parent.parent.debug(1, 'Agent update required, NodeID=0x' + obj.nodeid.substring(0, 16) + ', ' + obj.agentExeInfo.desc); }
parent.agentStats.agentBinaryUpdate++;
if (obj.agentExeInfo.data == null) {
// Read the agent from disk
parent.fs.open(obj.agentExeInfo.path, 'r', function (err, fd) {
@ -457,6 +458,7 @@ module.exports.CreateMeshAgent = function (parent, db, ws, req, args, domain) {
// If the mesh agent web socket is closed, clean up.
ws.on('close', function (req) {
parent.agentStats.agentClose++;
if (obj.nodeid != null) {
const agentId = (obj.agentInfo && obj.agentInfo.agentId) ? obj.agentInfo.agentId : 'Unknown';
//console.log('Agent disconnect ' + obj.nodeid + ' (' + obj.remoteaddrport + ') id=' + agentId);