File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ var extend = require('xtend/mutable')
66
77exports . DEFAULT_ANNOUNCE_INTERVAL = 30 * 60 * 1000 // 30 minutes
88
9- exports . DEFAULT_ANNOUNCE_PEERS = process . browser ? 5 : 50
9+ exports . DEFAULT_ANNOUNCE_PEERS = 50
1010exports . MAX_ANNOUNCE_PEERS = 82
1111
1212exports . binaryToHex = function ( str ) {
Original file line number Diff line number Diff line change @@ -59,6 +59,10 @@ WebSocketTracker.prototype.announce = function (opts) {
5959 opts . info_hash = self . client . _infoHash . toString ( 'binary' )
6060 opts . peer_id = self . client . _peerId . toString ( 'binary' )
6161
62+ // Limit number of offers to only 5 (temporarily)
63+ // TODO: remove this when we cleanup old RTCPeerConnections cleanly
64+ if ( opts . numWant > 5 ) opts . numWant = 5
65+
6266 self . _generateOffers ( opts . numWant , function ( offers ) {
6367 opts . offers = offers
6468
You can’t perform that action at this time.
0 commit comments