fix one ping/pong function

Signed-off-by: si458 <simonsmith5521@gmail.com>
This commit is contained in:
si458 2024-02-12 11:46:16 +00:00
parent 4098805798
commit 6f78f9e276
1 changed files with 14 additions and 17 deletions

View File

@ -842,11 +842,8 @@ module.exports.CreateMstscRelay = function (parent, db, ws, req, args, domain) {
obj.relaySocket.resume();
}
} else {
if (typeof data == 'string') {
// Forward any ping/pong commands to the browser
var cmd = null;
try { // Forward any ping/pong commands to the browser
cmd = JSON.parse(data);
var cmd = JSON.parse(data);
if ((cmd != null) && (cmd.ctrlChannel == '102938')) {
if (cmd.type == 'ping') { send(['ping']); }
else if (cmd.type == 'pong') { send(['pong']); }