limit webrtc offers to 10

This commit is contained in:
Feross Aboukhadijeh 2015-05-19 04:32:17 -07:00
parent 02c92fd2ba
commit d40eeccf4d

View File

@ -43,9 +43,9 @@ WebSocketTracker.prototype.announce = function (opts) {
opts.info_hash = self.client._infoHash.toString('binary')
opts.peer_id = self.client._peerId.toString('binary')
// Limit number of offers to only 5 (temporarily)
// Limit number of offers (temporarily)
// TODO: remove this when we cleanup old RTCPeerConnections cleanly
if (opts.numWant > 5) opts.numWant = 5
if (opts.numWant > 10) opts.numWant = 10
self._generateOffers(opts.numWant, function (offers) {
opts.offers = offers