Fixed MeshCentral Widnows Service exception.
Ylian Saint-Hilaire committed
Jul 18, 2019 at 10:42 UTC
b088d80250d09c6f628e316016a61f02b5d42026
2 files changed
+4
-4
meshcentral.js
+3
-3
@@ -186,7 +186,7 @@ function CreateMeshCentralServer(config, args) {
186
var child_process = require('child_process');
187
childProcess = child_process.execFile(process.argv[0], startArgs, { maxBuffer: Infinity, cwd: obj.parentpath }, function (error, stdout, stderr) {
188
if (childProcess.xrestart == 1) {
189
- setTimeout(function () { obj.launchChildServer(startLine); }, 500); // This is an expected restart.
189
+ setTimeout(function () { obj.launchChildServer(startArgs); }, 500); // This is an expected restart.
190
} else if (childProcess.xrestart == 2) {
191
console.log('Expected exit...');
192
process.exit(); // User CTRL-C exit.
@@ -219,14 +219,14 @@ function CreateMeshCentralServer(config, args) {
219
}
220
} catch (e) { console.error(e); }
221
}
222
- setTimeout(function () { obj.launchChildServer(startLine); }, 1000);
222
+ setTimeout(function () { obj.launchChildServer(startArgs); }, 1000);
223
});
224
} else {
225
if (error != null) {
226
// This is an un-expected restart
227
console.log(error);
228
console.log('ERROR: MeshCentral failed with critical error, check MeshErrors.txt. Restarting in 5 seconds...');
229
- setTimeout(function () { obj.launchChildServer(startLine); }, 5000);
229
+ setTimeout(function () { obj.launchChildServer(startArgs); }, 5000);
230
}
231
}
232
});
package.json
+1
-1
@@ -1,6 +1,6 @@
1
{
2
"name": "meshcentral",
3
- "version": "0.3.7-z",
3
+ "version": "0.3.8-a",
4
"keywords": [
5
"Remote Management",
6
"Intel AMT",