From f643c8336f2f6daf85747d5ac51fa574fac17660 Mon Sep 17 00:00:00 2001 From: Oded Leiba Date: Fri, 20 Jul 2018 14:57:35 +0300 Subject: [PATCH 1/2] pass discoveryIntervalMs for torrent-discovery --- lib/torrent.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/torrent.js b/lib/torrent.js index a7253f66..5c33de5d 100644 --- a/lib/torrent.js +++ b/lib/torrent.js @@ -72,6 +72,7 @@ function Torrent (torrentId, client, opts) { this.announce = opts.announce this.urlList = opts.urlList + this.discoveryIntervalMs = opts.discoveryIntervalMs this.path = opts.path this.skipVerify = !!opts.skipVerify @@ -339,7 +340,8 @@ Torrent.prototype._onListening = function () { dht: !self.private && self.client.dht, tracker: trackerOpts, port: self.client.torrentPort, - userAgent: USER_AGENT + userAgent: USER_AGENT, + discoveryIntervalMs: self.discoveryIntervalMs }) self.discovery.on('error', onError) From 7907c27e12b1d48bcb5ddf4c4cbe6b19fc682274 Mon Sep 17 00:00:00 2001 From: Oded Leiba Date: Fri, 20 Jul 2018 15:00:28 +0300 Subject: [PATCH 2/2] discoveryIntervalMs -> intervalMs --- lib/torrent.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/torrent.js b/lib/torrent.js index 5c33de5d..b22800b3 100644 --- a/lib/torrent.js +++ b/lib/torrent.js @@ -341,7 +341,7 @@ Torrent.prototype._onListening = function () { tracker: trackerOpts, port: self.client.torrentPort, userAgent: USER_AGENT, - discoveryIntervalMs: self.discoveryIntervalMs + intervalMs: self.discoveryIntervalMs }) self.discovery.on('error', onError)