From 4b2ea306fd1d16fd36b44565971cb7c355fe9768 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Rodr=C3=ADguez=20Baquero?= Date: Wed, 30 Mar 2016 03:45:14 -0300 Subject: [PATCH 1/2] Max Web Connections Default to 4 --- lib/torrent.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/torrent.js b/lib/torrent.js index 2cc0800b..2bff2e1d 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 From b792720d16964857069573353cf763ed828df917 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Rodr=C3=ADguez=20Baquero?= Date: Wed, 30 Mar 2016 03:46:04 -0300 Subject: [PATCH 2/2] Update api.md --- docs/api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api.md b/docs/api.md index 2abf87dc..71f58ac4 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) }