mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-01-24 13:13:13 -05:00
Fixed rare server exception.
This commit is contained in:
parent
a5052e2a8f
commit
a4d63e713d
@ -261,6 +261,7 @@ module.exports.CreateMeshAgent = function (parent, db, ws, req, args, domain) {
|
||||
obj.agentUpdate.buf[2] = 0;
|
||||
obj.agentUpdate.buf[3] = 1;
|
||||
parent.fs.read(obj.agentUpdate.fd, obj.agentUpdate.buf, 4, parent.parent.agentUpdateBlockSize, obj.agentUpdate.ptr, function (err, bytesRead, buffer) {
|
||||
if (obj.agentUpdate == null) return;
|
||||
if ((err != null) || (bytesRead == 0)) {
|
||||
// Error reading the agent file, stop here.
|
||||
try { parent.fs.close(obj.agentUpdate.fd); } catch (ex) { }
|
||||
|
Loading…
x
Reference in New Issue
Block a user