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>2015-12-10 10:57:35 +0300
committerFeross Aboukhadijeh <feross@feross.org>2015-12-17 14:39:55 +0300
commit4a759a59e2f127e0cded044dcd647084d1b8c26f (patch)
tree34dbef166161ac780aa24ec0a25430798d7b3074 /index.js
parente47b9a2a86db54fc3db7dd00c964d25b8203f71e (diff)
don't add default trackers when { tracker: false }
When the user sets `{ tracker: false }` on the WebTorrent client, don’t add trackers to the torrent by default.
Diffstat (limited to 'index.js')
-rw-r--r--index.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/index.js b/index.js
index edb4b59..b6cf733 100644
--- a/index.js
+++ b/index.js
@@ -206,6 +206,7 @@ WebTorrent.prototype.seed = function (input, opts, onseed) {
// When seeding from filesystem, initialize store from that path (avoids a copy)
if (typeof input === 'string') opts.path = path.dirname(input)
if (!opts.createdBy) opts.createdBy = 'WebTorrent/' + VERSION_STR
+ if (!self.tracker) opts.announce = []
var streams
var torrent = self.add(undefined, opts, function (torrent) {