Skip to content

Commit e76a0af

Browse files
committed
Changed buffering of ICE candidates.
1 parent 6c7a46e commit e76a0af

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

lib/jsflow-tracker.js

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ jsFlowTracker.prototype._onWebRtcIce = function (payload, from) {
234234
}
235235
else {
236236
console.error('Candidate refers to a peer not yet created. Buffering ICE!', payload);
237-
self.storeIce.push(payload.candidate)
237+
self.storeIce.push(payload)
238238
}
239239

240240
}
@@ -248,12 +248,5 @@ function processStoredCandidates (tracker, from) {
248248
console.log("Processing stored candidates.")
249249
var peer = tracker._peers[from]
250250
tracker.storeIce.forEach(function(candidate){
251-
var params = {
252-
info_hash: self.client._infoHash.toString('base64'),
253-
peer_id: self._peerID,
254-
candidate: signalObject.candidate
255-
}
256-
257-
jsFlow.messageUser(from, params, 'webrtc_ice');
258-
})
251+
peer.signal(payload)
259252
}

0 commit comments

Comments
 (0)