From 612dc5ccc554584ab2b849767da83e1a235c450d Mon Sep 17 00:00:00 2001 From: jordan lavatai Date: Tue, 4 Jul 2017 16:33:55 -0700 Subject: [PATCH] client add ICE --- client.js | 1 + main.js | 5 +---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/client.js b/client.js index eab3187..8a4fe43 100644 --- a/client.js +++ b/client.js @@ -108,6 +108,7 @@ function pollServerForICECandidate(cpc) { } request.send(cpc.pubKey) }).then((response) => { + console.log('Client: Adding Ice Candidate ') cpc.addIceCandidate(response.candidate) }).catch((err) => { console.log('pollServerForICECandidate: ' + err) diff --git a/main.js b/main.js index 9187a77..a5b105b 100644 --- a/main.js +++ b/main.js @@ -66,9 +66,7 @@ const router = { const clients = route['clients'] const headerData = request.headers['x-strapp-type'] - if (route.socket === undefined ) { - console.log('route socket undefined') - } + /* Client is INIT GET */ if (headerData === undefined) { @@ -88,7 +86,6 @@ const router = { data = Buffer.concat(data).toString(); console.log('Sending ice-candidate-request to Host' + data) clients.set(data, response) - route.socket.send(data) }) } -- 2.18.0