Fixed server exception in MeshAgent.
Ylian Saint-Hilaire committed
Jun 7, 2019 at 09:44 UTC
21a6c048fb856e00283bd716ce0d9f47ff0d7f46
2 files changed
+5
-5
meshagent.js
+4
-4
@@ -696,11 +696,11 @@ module.exports.CreateMeshAgent = function (parent, db, ws, req, args, domain) {
696
}
697
}
698
699
- completeAgentConnection3(device);
699
+ completeAgentConnection3(device, mesh);
700
});
701
}
702
703
- function completeAgentConnection2(device) {
703
+ function completeAgentConnection2() {
704
// See if this mesh exists, if it does not we may want to create it.
705
var mesh = getMeshAutoCreate();
706
@@ -736,10 +736,10 @@ module.exports.CreateMeshAgent = function (parent, db, ws, req, args, domain) {
736
parent.parent.DispatchEvent(['*', obj.dbMeshKey], obj, { etype: 'node', action: 'addnode', node: device, msg: ('Added device ' + obj.agentInfo.computerName + ' to mesh ' + mesh.name), domain: domain.id });
737
}
738
739
- completeAgentConnection3(device);
739
+ completeAgentConnection3(device, mesh);
740
}
741
742
- function completeAgentConnection3(device) {
742
+ function completeAgentConnection3(device, mesh) {
743
// Check if this agent is already connected
744
const dupAgent = parent.wsagents[obj.dbNodeKey];
745
parent.wsagents[obj.dbNodeKey] = obj;
package.json
+1
-1
@@ -1,6 +1,6 @@
1
{
2
"name": "meshcentral",
3
- "version": "0.3.6-c",
3
+ "version": "0.3.6-d",
4
"keywords": [
5
"Remote Management",
6
"Intel AMT",