mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-12-24 06:05:53 -05:00
Removed any ping/pong on MSTSC channel.
This commit is contained in:
parent
2503404726
commit
f37d0abdda
@ -299,9 +299,11 @@ function CreateMeshRelayEx(parent, ws, req, domain, user, cookie) {
|
||||
// Remove the timeout
|
||||
if (relayinfo.timeout) { clearTimeout(relayinfo.timeout); delete relayinfo.timeout; }
|
||||
|
||||
// Setup the agent PING/PONG timers
|
||||
if ((typeof parent.parent.args.agentping == 'number') && (obj.pingtimer == null)) { obj.pingtimer = setInterval(sendPing, parent.parent.args.agentping * 1000); }
|
||||
else if ((typeof parent.parent.args.agentpong == 'number') && (obj.pongtimer == null)) { obj.pongtimer = setInterval(sendPong, parent.parent.args.agentpong * 1000); }
|
||||
// Setup the agent PING/PONG timers unless requested not to
|
||||
if ((obj.req.query.noping != 1) && (obj.peer.req != null) && (obj.peer.req.query != null) && (obj.peer.req.query.noping != 1)) {
|
||||
if ((typeof parent.parent.args.agentping == 'number') && (obj.pingtimer == null)) { obj.pingtimer = setInterval(sendPing, parent.parent.args.agentping * 1000); }
|
||||
else if ((typeof parent.parent.args.agentpong == 'number') && (obj.pongtimer == null)) { obj.pongtimer = setInterval(sendPong, parent.parent.args.agentpong * 1000); }
|
||||
}
|
||||
|
||||
// Setup session recording
|
||||
var sessionUser = obj.user;
|
||||
|
2
mstsc.js
2
mstsc.js
@ -67,7 +67,7 @@ module.exports.CreateMstscRelay = function (parent, db, ws, req, args, domain) {
|
||||
if (args.tlsoffload) { protocol = 'ws'; }
|
||||
var domainadd = '';
|
||||
if ((domain.dns == null) && (domain.id != '')) { domainadd = domain.id + '/' }
|
||||
var url = protocol + '://127.0.0.1:' + args.port + '/' + domainadd + 'meshrelay.ashx?auth=' + obj.infos.ip;
|
||||
var url = protocol + '://127.0.0.1:' + args.port + '/' + domainadd + 'meshrelay.ashx?noping=1&auth=' + obj.infos.ip;
|
||||
parent.parent.debug('relay', 'RDP: Connection websocket to ' + url);
|
||||
obj.wsClient = new WebSocket(url, options);
|
||||
obj.wsClient.on('open', function () { parent.parent.debug('relay', 'RDP: Relay websocket open'); });
|
||||
|
@ -150,7 +150,7 @@
|
||||
connect : function (ip, domain, username, password, next) {
|
||||
// Start connection
|
||||
var self = this;
|
||||
this.socket = new WebSocket("wss://" + window.location.host + "/mstsc/relay.ashx");
|
||||
this.socket = new WebSocket('wss://' + window.location.host + '/mstsc/relay.ashx');
|
||||
this.socket.binaryType = 'arraybuffer';
|
||||
this.socket.onopen = function () {
|
||||
//console.log("WS-OPEN");
|
||||
|
Loading…
Reference in New Issue
Block a user