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
|
// Remove the timeout
|
||||||
if (relayinfo.timeout) { clearTimeout(relayinfo.timeout); delete relayinfo.timeout; }
|
if (relayinfo.timeout) { clearTimeout(relayinfo.timeout); delete relayinfo.timeout; }
|
||||||
|
|
||||||
// Setup the agent PING/PONG timers
|
// Setup the agent PING/PONG timers unless requested not to
|
||||||
if ((typeof parent.parent.args.agentping == 'number') && (obj.pingtimer == null)) { obj.pingtimer = setInterval(sendPing, parent.parent.args.agentping * 1000); }
|
if ((obj.req.query.noping != 1) && (obj.peer.req != null) && (obj.peer.req.query != null) && (obj.peer.req.query.noping != 1)) {
|
||||||
else if ((typeof parent.parent.args.agentpong == 'number') && (obj.pongtimer == null)) { obj.pongtimer = setInterval(sendPong, parent.parent.args.agentpong * 1000); }
|
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
|
// Setup session recording
|
||||||
var sessionUser = obj.user;
|
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'; }
|
if (args.tlsoffload) { protocol = 'ws'; }
|
||||||
var domainadd = '';
|
var domainadd = '';
|
||||||
if ((domain.dns == null) && (domain.id != '')) { domainadd = domain.id + '/' }
|
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);
|
parent.parent.debug('relay', 'RDP: Connection websocket to ' + url);
|
||||||
obj.wsClient = new WebSocket(url, options);
|
obj.wsClient = new WebSocket(url, options);
|
||||||
obj.wsClient.on('open', function () { parent.parent.debug('relay', 'RDP: Relay websocket open'); });
|
obj.wsClient.on('open', function () { parent.parent.debug('relay', 'RDP: Relay websocket open'); });
|
||||||
|
|
|
@ -150,7 +150,7 @@
|
||||||
connect : function (ip, domain, username, password, next) {
|
connect : function (ip, domain, username, password, next) {
|
||||||
// Start connection
|
// Start connection
|
||||||
var self = this;
|
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.binaryType = 'arraybuffer';
|
||||||
this.socket.onopen = function () {
|
this.socket.onopen = function () {
|
||||||
//console.log("WS-OPEN");
|
//console.log("WS-OPEN");
|
||||||
|
|
Loading…
Reference in New Issue