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

Minor fixes.

This commit is contained in:
Ylian Saint-Hilaire 2019-02-12 13:37:01 -08:00
parent 7c79080a52
commit 250ee1bc48
5 changed files with 9 additions and 6 deletions

View file

@ -342,8 +342,10 @@ 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) {
if (obj.nodeid != null) {
//console.log('Agent disconnect ' + obj.nodeid + ' (' + obj.remoteaddrport + ') id=' + obj.agentInfo.agentId);
obj.parent.parent.debug(1, 'Agent disconnect ' + obj.nodeid + ' (' + obj.remoteaddrport + ') id=' + obj.agentInfo.agentId);
var agentId = 'Unknown';
if (obj.agentInfo && obj.agentInfo.agentId) { agentId = obj.agentInfo.agentId; }
//console.log('Agent disconnect ' + obj.nodeid + ' (' + obj.remoteaddrport + ') id=' + agentId);
obj.parent.parent.debug(1, 'Agent disconnect ' + obj.nodeid + ' (' + obj.remoteaddrport + ') id=' + agentId);
// Log the agent disconnection
if (obj.parent.wsagentsDisconnections[obj.nodeid] == null) {