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-07-16 06:27:20 +0300
committerFeross Aboukhadijeh <feross@feross.org>2015-07-16 06:27:20 +0300
commite3ae9d6ddfeddf8f37e42a25b25b4ae511219e0e (patch)
tree6f56f08a6914d51f03b05465c47974b5cd4257eb /bin/cmd.js
parent7c23845b18e150960eff7b7d82fd3d7c91eca08f (diff)
cmd: listen to 'wire' event on torrent directly
Diffstat (limited to 'bin/cmd.js')
-rwxr-xr-xbin/cmd.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/cmd.js b/bin/cmd.js
index fadf0dd..cbb7da5 100755
--- a/bin/cmd.js
+++ b/bin/cmd.js
@@ -232,12 +232,12 @@ function runDownload (torrentId) {
}
if (!argv.quiet) {
- torrent.swarm.on('wire', updateMetadata)
+ updateMetadata()
+ torrent.on('wire', updateMetadata)
torrent.on('metadata', function () {
clivas.clear()
- torrent.swarm.removeListener('wire', updateMetadata)
+ torrent.removeListener('wire', updateMetadata)
})
- updateMetadata()
}
})