mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Many fixes with desktop recording indexor and player.
This commit is contained in:
parent
25a0af7383
commit
421a6349d5
4 changed files with 49 additions and 44 deletions
24
meshrelay.js
24
meshrelay.js
|
@ -330,17 +330,6 @@ module.exports.CreateMeshRelay = function (parent, ws, req, domain, user, cookie
|
|||
if (relayinfo.state == 2) {
|
||||
var peer = (relayinfo.peer1 == obj) ? relayinfo.peer2 : relayinfo.peer1;
|
||||
|
||||
// Close the recording file
|
||||
if (ws.logfile != null) {
|
||||
recordingEntry(ws.logfile.fd, 3, 0, 'MeshCentralMCREC', function (fd, tag) {
|
||||
parent.parent.fs.close(fd);
|
||||
tag.ws.logfile = null;
|
||||
tag.pws.logfile = null;
|
||||
// Now that the recording file is closed, check if we need to index this file.
|
||||
if (domain.sessionrecording.index !== false) { parent.parent.certificateOperations.acceleratorPerformOperation('indexMcRec', tag.logfile.filename); }
|
||||
}, { ws: ws, pws: peer.ws, logfile: ws.logfile });
|
||||
}
|
||||
|
||||
// Disconnect the peer
|
||||
try { if (peer.relaySessionCounted) { parent.relaySessionCount--; delete peer.relaySessionCounted; } } catch (ex) { console.log(ex); }
|
||||
parent.parent.debug('relay', 'Relay disconnect: ' + obj.id + ' (' + cleanRemoteAddr(obj.req.ip) + ' --> ' + cleanRemoteAddr(peer.req.ip) + ')');
|
||||
|
@ -369,6 +358,19 @@ module.exports.CreateMeshRelay = function (parent, ws, req, domain, user, cookie
|
|||
} else {
|
||||
parent.parent.debug('relay', 'Relay disconnect: ' + obj.id + ' (' + cleanRemoteAddr(obj.req.ip) + ')');
|
||||
}
|
||||
|
||||
// Close the recording file if needed
|
||||
if (ws.logfile != null) {
|
||||
var logfile = ws.logfile;
|
||||
delete ws.logfile;
|
||||
if (peer.ws) { delete peer.ws.logfile; }
|
||||
recordingEntry(logfile.fd, 3, 0, 'MeshCentralMCREC', function (fd, tag) {
|
||||
parent.parent.fs.close(fd);
|
||||
// Now that the recording file is closed, check if we need to index this file.
|
||||
if (domain.sessionrecording.index !== false) { parent.parent.certificateOperations.acceleratorPerformOperation('indexMcRec', tag.logfile.filename); }
|
||||
}, { ws: ws, pws: peer.ws, logfile: logfile });
|
||||
}
|
||||
|
||||
try { ws.close(); } catch (ex) { }
|
||||
delete parent.wsrelays[obj.id];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue