diff options
author | Feross Aboukhadijeh <feross@feross.org> | 2015-12-29 19:24:17 +0300 |
---|---|---|
committer | Feross Aboukhadijeh <feross@feross.org> | 2015-12-29 19:46:10 +0300 |
commit | 210741b62b2f9dbab5ce43c10f1473bd8c85b850 (patch) | |
tree | 23fcfa971550d8667fa19d77a5b77c57840ef11b /lib | |
parent | 8518ea886ae0af22f89b62d000dfd9d43e3e9a20 (diff) |
BREAKING: rename opts.maxPeers -> opts.maxConns
- The underlying option on the `bittorrent-swarm` instance is named
`maxConns` which is a more accurate name
- Let `bittorrent-swarm` handle non-number maxConns values
Diffstat (limited to 'lib')
-rw-r--r-- | lib/torrent.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/torrent.js b/lib/torrent.js index 3f41c09..8af4b68 100644 --- a/lib/torrent.js +++ b/lib/torrent.js @@ -50,7 +50,7 @@ inherits(Torrent, EventEmitter) /** * @param {string|Buffer|Object} torrentId - * @param {Object} opts + * @param {Object=} opts */ function Torrent (torrentId, opts) { EventEmitter.call(this) @@ -204,7 +204,7 @@ Torrent.prototype._onParsedTorrent = function (parsedTorrent) { handshake: { dht: self.private ? false : !!self.client.dht }, - maxConns: self.client.maxPeers + maxConns: self.client.maxConns }) self.swarm.on('error', self._onError.bind(self)) self.swarm.on('wire', self._onWire.bind(self)) |