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

MeshCMD route error handling.

This commit is contained in:
Ylian Saint-Hilaire 2021-11-02 21:53:23 -07:00
parent 8eaa1ee4a9
commit 66842d53c9
3 changed files with 4 additions and 17 deletions

View file

@ -2050,6 +2050,7 @@ function startRouter() {
settings.websocket = http.request(options);
settings.websocket.upgrade = OnServerWebSocket;
settings.websocket.on('error', function (ex) { console.log("Unable to connect to server: " + JSON.stringify(ex)); process.exit(1); return; });
settings.websocket.on('response', function (rsp) { console.log("Unable to connect to server: " + rsp.statusMessage + " (" + rsp.statusCode + ")"); process.exit(1); return; });
settings.websocket.end();
}