X-Git-Url: https://www.kengrimes.com/gitweb/?p=henge%2Fkiak.git;a=blobdiff_plain;f=client.js;h=cb3872fed4563fa532d7b6209d059e6a8c1a35af;hp=8a4fe43f11b888df4376e4cd6aa31066ad380e26;hb=db732e6001859d6f3900ecf1d921513bc24a5c23;hpb=612dc5ccc554584ab2b849767da83e1a235c450d diff --git a/client.js b/client.js index 8a4fe43..cb3872f 100644 --- a/client.js +++ b/client.js @@ -85,7 +85,7 @@ function pollServerForAnswer(url, data, resolve, reject) { /* Poll server for ice candidates until ice is complete */ function pollServerForICECandidate(cpc) { window.setInterval(() => { - if (cpc.iceGatheringState !== 'complete') { + if (cpc.iceGatheringState.localeCompare('complete') === 0) { return new Promise((resolve, reject) => { console.log('Client: Requesting ICE Candidates from server') const request = new XMLHttpRequest()