mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-02-03 09:55:57 -05:00
Updated MeshCentral Router
This commit is contained in:
parent
119bf305ae
commit
c06715682e
Binary file not shown.
@ -1188,7 +1188,10 @@ function CreateLocalRelayEx(parent, ws, req, domain, user, cookie) {
|
|||||||
ws.flushSink = function () { try { ws._socket.resume(); } catch (ex) { console.log(ex); } };
|
ws.flushSink = function () { try { ws._socket.resume(); } catch (ex) { console.log(ex); } };
|
||||||
|
|
||||||
// When data is received from the mesh relay web socket
|
// When data is received from the mesh relay web socket
|
||||||
ws.on('message', function (data) { if (typeof data != 'string') { try { ws._socket.pause(); obj.client.write(data, ws.flushSink); } catch (ex) { } } }); // Perform relay
|
ws.on('message', function (data) {
|
||||||
|
if (typeof data != 'string') { try { ws._socket.pause(); obj.client.write(data, ws.flushSink); } catch (ex) { } }
|
||||||
|
else { console.log("RelayString: " + data); }
|
||||||
|
}); // Perform relay
|
||||||
|
|
||||||
// If error, close both sides of the relay.
|
// If error, close both sides of the relay.
|
||||||
ws.on('error', function (err) { parent.relaySessionErrorCount++; obj.close(); });
|
ws.on('error', function (err) { parent.relaySessionErrorCount++; obj.close(); });
|
||||||
|
Loading…
x
Reference in New Issue
Block a user