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
diff options
context:
space:
mode:
authorFeross Aboukhadijeh <feross@feross.org>2016-04-06 10:37:05 +0300
committerFeross Aboukhadijeh <feross@feross.org>2016-04-06 10:37:05 +0300
commit796e28ae66dec1d3ac7c21aaf85a76cbee1b3151 (patch)
treedc40159fc811e745886fab87ba55f15ff74c2028
parentbb0a926d718728fe5466370374783437cc19c994 (diff)
parent7205c151a044d121f529cac653bcf52a0a222a7a (diff)
Merge pull request #710 from feross/max-web-conns-default
Max web conns default
-rw-r--r--docs/api.md2
-rw-r--r--lib/torrent.js2
2 files changed, 2 insertions, 2 deletions
diff --git a/docs/api.md b/docs/api.md
index 2abf87d..71f58ac 100644
--- a/docs/api.md
+++ b/docs/api.md
@@ -80,7 +80,7 @@ If `opts` is specified, then the default options (shown below) will be overridde
{
announce: [], // Torrent trackers to use (added to list in .torrent or magnet uri)
getAnnounceOpts: Function, // Custom callback to allow sending extra parameters to the tracker
- maxWebConns: Number, // Max number of simultaneous connections per web seed
+ maxWebConns: Number, // Max number of simultaneous connections per web seed [default=4]
path: String, // Folder to download files to (default=`/tmp/webtorrent/`)
store: Function // Custom chunk store (must follow [abstract-chunk-store](https://www.npmjs.com/package/abstract-chunk-store) API)
}
diff --git a/lib/torrent.js b/lib/torrent.js
index 01f08e0..0f99ee9 100644
--- a/lib/torrent.js
+++ b/lib/torrent.js
@@ -75,7 +75,7 @@ function Torrent (torrentId, client, opts) {
this.strategy = opts.strategy || 'sequential'
- this.maxWebConns = opts.maxWebConns
+ this.maxWebConns = opts.maxWebConns || 4
this._rechokeNumSlots = (opts.uploads === false || opts.uploads === 0)
? 0