Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/webtorrent/webtorrent.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAram Drevekenin <grimsniffer@gmail.com>2015-12-29 18:16:03 +0300
committerAram Drevekenin <grimsniffer@gmail.com>2015-12-29 18:16:03 +0300
commitdf5614ae0d8711b420c27a3681e115501daa1f23 (patch)
tree9b271adef75994b9ecb3545820cf5fe31283d0c9 /lib
parentbff953e21aa6faa9eaea2fd0cbd4e6086a39a8ba (diff)
Set maxPeers on client and pass down to every torrent
Diffstat (limited to 'lib')
-rw-r--r--lib/torrent.js3
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))