Debug code cleanup

This commit is contained in:
Ryan Blenis 2019-10-09 04:54:37 -04:00
parent 4f05936d75
commit a7728f3c2f
1 changed files with 1 additions and 11 deletions

View File

@ -1497,22 +1497,12 @@ function createMeshCore(agent)
if (cmd == null) { return; } if (cmd == null) { return; }
if ((cmd.ctrlChannel == '102938') || ((cmd.type == 'offer') && (cmd.sdp != null))) { onTunnelControlData(cmd, this); return; } // If this is control data, handle it now. if ((cmd.ctrlChannel == '102938') || ((cmd.type == 'offer') && (cmd.sdp != null))) { onTunnelControlData(cmd, this); return; } // If this is control data, handle it now.
if (cmd.action == undefined) { return; } if (cmd.action == undefined) { return; }
//sendConsoleText('CMD: ' + JSON.stringify(cmd));
if ((cmd.path != null) && (process.platform != 'win32') && (cmd.path[0] != '/')) { cmd.path = '/' + cmd.path; } // Add '/' to paths on non-windows
//console.log(objToString(cmd, 0, ' '));
switch (cmd.action) { switch (cmd.action) {
case 'plugin': { case 'plugin': {
try { try {
require(cmd.plugin).consoleaction(cmd, null, null, this); require(cmd.plugin).consoleaction(cmd, null, null, this);
} catch (e) { } catch (e) { throw e; }
/*var fs = require('fs');
var logStream = fs.createWriteStream('log.txt', {'flags': 'a'});
logStream.write('\nCouldnt load plugin '+e+e.stack);
logStream.end('\n')*/
throw e;
}
break; break;
} }