mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-02-12 11:01:52 +00:00
Fixed possible server exceptions.
This commit is contained in:
parent
dc9a9264dd
commit
eb4c7995da
2 changed files with 7 additions and 2 deletions
|
@ -1671,7 +1671,12 @@ module.exports.CreateMeshAgent = function (parent, db, ws, req, args, domain) {
|
||||||
if ((tag != null) && (tag.length == 0)) { tag = null; }
|
if ((tag != null) && (tag.length == 0)) { tag = null; }
|
||||||
|
|
||||||
// If the device is pending a change, hold.
|
// If the device is pending a change, hold.
|
||||||
if (obj.deviceChanging === true) { setTimeout(function () { ChangeAgentCoreInfo(command); }, 100); return; }
|
if (obj.deviceChanging === true) {
|
||||||
|
var func = function ChangeAgentTagFunc() { ChangeAgentCoreInfo(ChangeAgentTagFunc.cmd); }
|
||||||
|
func.cmd = command;
|
||||||
|
setTimeout(func, 100);
|
||||||
|
return;
|
||||||
|
}
|
||||||
obj.deviceChanging = true;
|
obj.deviceChanging = true;
|
||||||
|
|
||||||
// Get the node and change it if needed
|
// Get the node and change it if needed
|
||||||
|
|
|
@ -3659,7 +3659,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
|
||||||
// Log to recording file
|
// Log to recording file
|
||||||
if (ws.logfile == null) {
|
if (ws.logfile == null) {
|
||||||
// Forward data to the associated TCP connection.
|
// Forward data to the associated TCP connection.
|
||||||
ws.forwardclient.write(data);
|
try { ws.forwardclient.write(data); } catch (ex) { }
|
||||||
} else {
|
} else {
|
||||||
// Log to recording file
|
// Log to recording file
|
||||||
recordingEntry(ws.logfile.fd, 2, 2, data, function () { try { ws.forwardclient.write(data); } catch (ex) { } });
|
recordingEntry(ws.logfile.fd, 2, 2, data, function () { try { ws.forwardclient.write(data); } catch (ex) { } });
|
||||||
|
|
Loading…
Reference in a new issue