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

Fixed to server crash issues.

This commit is contained in:
Ylian Saint-Hilaire 2019-02-18 19:11:34 -08:00
parent b9d7474a7d
commit c83bf89a80
3 changed files with 3 additions and 3 deletions

View file

@ -116,7 +116,7 @@ module.exports.CreateMeshAgent = function (parent, db, ws, req, args, domain) {
const agentMeshCoreHash = (msg.length == 52) ? msg.substring(4, 52) : null;
// If the agent indicates this is a custom core, we are done. TODO: Speed up this compare.
if (Buffer.from(agentMeshCoreHash, 'binary').toString('hex') == '000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000') {
if ((agentMeshCoreHash != null) && (Buffer.from(agentMeshCoreHash, 'binary').toString('hex') == '000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000')) {
obj.agentCoreCheck = 0;
obj.send(obj.common.ShortToStr(16) + obj.common.ShortToStr(0)); // MeshCommand_CoreOk. Indicates to the agent that the core is ok. Start it if it's not already started.
agentCoreIsStable();