Debug code cleanup
Ryan Blenis committed
Oct 9, 2019 at 04:54 UTC
f257c2b8195e3049d7b00b97a0dc0a4522781e83
1 file changed
+1
-11
agents/meshcore.min.js
+1
-11
@@ -1497,22 +1497,12 @@ function createMeshCore(agent)
1497
if (cmd == null) { return; }
1498
if ((cmd.ctrlChannel == '102938') || ((cmd.type == 'offer') && (cmd.sdp != null))) { onTunnelControlData(cmd, this); return; } // If this is control data, handle it now.
1499
if (cmd.action == undefined) { return; }
1500
- //sendConsoleText('CMD: ' + JSON.stringify(cmd));
1500
1502
- if ((cmd.path != null) && (process.platform != 'win32') && (cmd.path[0] != '/')) { cmd.path = '/' + cmd.path; } // Add '/' to paths on non-windows
1503
- //console.log(objToString(cmd, 0, ' '));
1504
-
1501
switch (cmd.action) {
1502
case 'plugin': {
1503
try {
1504
require(cmd.plugin).consoleaction(cmd, null, null, this);
1509
- } catch (e) {
1510
- /*var fs = require('fs');
1511
- var logStream = fs.createWriteStream('log.txt', {'flags': 'a'});
1512
- logStream.write('\nCouldnt load plugin '+e+e.stack);
1513
- logStream.end('\n')*/
1514
- throw e;
1515
- }
1505
+ } catch (e) { throw e; }
1506
1507
break;
1508
}