mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-11-07 12:52:54 -05:00
Added full agent ping/pong support on SSH/SFTP sessions.
This commit is contained in:
@@ -186,7 +186,10 @@
|
||||
socket.onmessage = function (data) {
|
||||
if (typeof data.data != 'string') return;
|
||||
if (data.data[0] == '{') {
|
||||
var json = JSON.parse(data.data);
|
||||
var json = null;
|
||||
try { json = JSON.parse(data.data); } catch (ex) { }
|
||||
if ((json == null) || (typeof json != 'object')) return;
|
||||
if ((json.ctrlChannel == 102938) && (json.type == 'ping')) { socket.send('{"ctrlChannel":"102938","type":"pong"}'); return; }
|
||||
switch (json.action) {
|
||||
case 'connected': { state = 3; updateState(); term.focus(); break; }
|
||||
case 'sshauth': {
|
||||
|
||||
Reference in New Issue
Block a user