From 25fddb7ba54ea3fd388abeef1bf560a6aebaa49d Mon Sep 17 00:00:00 2001 From: Moe Date: Mon, 28 Mar 2022 17:48:08 -0700 Subject: [PATCH] Better P2P (Easy Remote Access v2)+ --- libs/commander/workerv2.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libs/commander/workerv2.js b/libs/commander/workerv2.js index 862c44db..cef2aa0a 100644 --- a/libs/commander/workerv2.js +++ b/libs/commander/workerv2.js @@ -37,9 +37,9 @@ function startConnection(p2pServerAddress,subscriptionId){ const allMessageHandlers = [] function startWebsocketConnection(key,callback){ function disconnectedConnection(code,reason){ - console.log('stayDisconnected',stayDisconnected) + s.debugLog('stayDisconnected',stayDisconnected) if(stayDisconnected)return; - console.log('DISCONNECTED! RESTARTING!') + s.debugLog('DISCONNECTED! RESTARTING!') setTimeout(() => { startWebsocketConnection() },2000) @@ -49,7 +49,7 @@ function startConnection(p2pServerAddress,subscriptionId){ }catch(err){ console.log(err) } - console.log(p2pServerAddress) + s.debugLog(p2pServerAddress) tunnelToShinobi = new WebSocket(p2pServerAddress || 'ws://172.16.101.218:81'); tunnelToShinobi.on('open', function(){ @@ -126,10 +126,10 @@ function startConnection(p2pServerAddress,subscriptionId){ // const hostParts = data.host.split(':') // const host = hostParts[0] // const port = parseInt(hostParts[1]) || 80 - console.log('New Request Incoming', null, null, requestId) + s.debugLog('New Request Incoming', null, null, requestId) const socket = createRemoteSocket(null, null, requestId) socket.on('ready',() => { - console.log('READY') + s.debugLog('READY') writeToServer(data.init,requestId) }) })