One more server exception fix.
Ylian Saint-Hilaire committed
Jan 25, 2021 at 11:08 UTC
b9af7924a29993e9dbd3469fc2ed6aebc23310f7
1 file changed
+4
-4
meshagent.js
+4
-4
@@ -1159,11 +1159,14 @@ module.exports.CreateMeshAgent = function (parent, db, ws, req, args, domain) {
1159
}
1160
case 'coreinfo':
1161
{
1162
+ // Sent by the agent to update agent information
1163
+ ChangeAgentCoreInfo(command);
1164
+
1165
if ((obj.agentCoreUpdate === true) && (obj.agentExeInfo != null)) {
1166
// Agent update. The recovery core was loaded in the agent, send a command to update the agent
1167
parent.parent.taskLimiter.launch(function (argument, taskid, taskLimiterQueue) { // Medium priority task
1168
// If agent disconnection, complete and exit now.
1166
- if (obj.authenticated != 2) { parent.parent.taskLimiter.completed(taskid); return; }
1169
+ if ((obj.authenticated != 2) || (obj.agentExeInfo == null)) { parent.parent.taskLimiter.completed(taskid); return; }
1170
1171
// Agent update. The recovery core was loaded in the agent, send a command to update the agent
1172
obj.agentCoreUpdateTaskId = taskid;
@@ -1183,9 +1186,6 @@ module.exports.CreateMeshAgent = function (parent, db, ws, req, args, domain) {
1186
// Send the agent update command
1187
obj.send(JSON.stringify(cmd));
1188
}, null, 1);
1186
- } else {
1187
- // Sent by the agent to update agent information
1188
- ChangeAgentCoreInfo(command);
1189
}
1190
break;
1191
}