diff options
author | Aram Drevekenin <grimsniffer@gmail.com> | 2015-12-29 18:16:03 +0300 |
---|---|---|
committer | Aram Drevekenin <grimsniffer@gmail.com> | 2015-12-29 18:16:03 +0300 |
commit | df5614ae0d8711b420c27a3681e115501daa1f23 (patch) | |
tree | 9b271adef75994b9ecb3545820cf5fe31283d0c9 /lib | |
parent | bff953e21aa6faa9eaea2fd0cbd4e6086a39a8ba (diff) |
Set maxPeers on client and pass down to every torrent
Diffstat (limited to 'lib')
-rw-r--r-- | lib/torrent.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/torrent.js b/lib/torrent.js index 71ee9dc..126c7b2 100644 --- a/lib/torrent.js +++ b/lib/torrent.js @@ -203,7 +203,8 @@ Torrent.prototype._onParsedTorrent = function (parsedTorrent) { self.swarm = new Swarm(self.infoHash, self.client.peerId, { handshake: { dht: self.private ? false : !!self.client.dht - } + }, + maxConns: self.client.maxPeers }) self.swarm.on('error', self._onError.bind(self)) self.swarm.on('wire', self._onWire.bind(self)) |