client add ICE
authorjordan lavatai <jordanlavatai@gmail.com>
Tue, 4 Jul 2017 23:33:55 +0000 (16:33 -0700)
committerjordan lavatai <jordanlavatai@gmail.com>
Tue, 4 Jul 2017 23:33:55 +0000 (16:33 -0700)
client.js
main.js

index eab3187..8a4fe43 100644 (file)
--- 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 (file)
--- 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)
         })
       }