mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-12-25 22:55:52 -05:00
Agent now sends session messages on each server reconnect.
This commit is contained in:
parent
38a8a12a49
commit
ce4fdd14e3
@ -2393,7 +2393,7 @@ function createMeshCore(agent) {
|
|||||||
if (args['_'].length != 1) {
|
if (args['_'].length != 1) {
|
||||||
response = "Proper usage: addagentmsg \"Alert Message\""; // Display usage
|
response = "Proper usage: addagentmsg \"Alert Message\""; // Display usage
|
||||||
} else {
|
} else {
|
||||||
tunnelUserCount.msg[args['_']] = 1;
|
tunnelUserCount.msg[args['_'][0]] = 1;
|
||||||
try { mesh.SendCommand({ action: 'sessions', type: 'msg', value: tunnelUserCount.msg }); } catch (ex) { }
|
try { mesh.SendCommand({ action: 'sessions', type: 'msg', value: tunnelUserCount.msg }); } catch (ex) { }
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -3444,6 +3444,11 @@ function createMeshCore(agent) {
|
|||||||
meInfoStr = null;
|
meInfoStr = null;
|
||||||
sendPeriodicServerUpdate();
|
sendPeriodicServerUpdate();
|
||||||
if (selfInfoUpdateTimer == null) { selfInfoUpdateTimer = setInterval(sendPeriodicServerUpdate, 1200000); } // 20 minutes
|
if (selfInfoUpdateTimer == null) { selfInfoUpdateTimer = setInterval(sendPeriodicServerUpdate, 1200000); } // 20 minutes
|
||||||
|
|
||||||
|
// Send any state messages
|
||||||
|
if (Object.keys(tunnelUserCount.msg).length > 0) {
|
||||||
|
try { mesh.SendCommand({ action: 'sessions', type: 'msg', value: tunnelUserCount.msg }); } catch (ex) { }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user