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-07-26 07:59:00 +0300
committerFeross Aboukhadijeh <feross@feross.org>2016-07-26 07:59:00 +0300
commitbfa776ba2260ecffae3cac45bec2299a55b36490 (patch)
treec9da21929856335a69b374853a1fcd0595952cb0
parent69a61e074d564983c584e5c736789522ebe35d13 (diff)
Use discovery.complete() API
-rw-r--r--lib/torrent.js4
-rw-r--r--package.json2
2 files changed, 2 insertions, 4 deletions
diff --git a/lib/torrent.js b/lib/torrent.js
index 6d29c5e..e4bedef 100644
--- a/lib/torrent.js
+++ b/lib/torrent.js
@@ -1574,9 +1574,7 @@ Torrent.prototype._checkDone = function () {
if (!self.done && done) {
self.done = true
self._debug('torrent done: ' + self.infoHash)
- if (self.discovery.tracker) {
- self.discovery.tracker.complete()
- }
+ self.discovery.complete()
self.emit('done')
}
diff --git a/package.json b/package.json
index 8a27a2f..01a29f3 100644
--- a/package.json
+++ b/package.json
@@ -60,7 +60,7 @@
"stream-to-blob": "^1.0.0",
"stream-to-blob-url": "^2.1.0",
"stream-with-known-length-to-buffer": "^1.0.0",
- "torrent-discovery": "^8.0.0",
+ "torrent-discovery": "^8.1.0",
"torrent-piece": "^1.1.0",
"uniq": "^1.0.1",
"unordered-array-remove": "^1.0.2",