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:
authorDiego Rodriguez Baquero <diego.baquero@pager.com>2020-04-02 00:45:56 +0300
committerDiego Rodriguez Baquero <diego.baquero@pager.com>2020-04-02 00:45:56 +0300
commit9fa526e7cabcfebb68f1144b0b3d4acbc8920b7e (patch)
tree2a2aedf0b3746f84e3f2920b9af3bc2b1f4fe8ae /lib/torrent.js
parent67549f83c23e91b8e545d8126a272207535658a9 (diff)
fix ratio
Diffstat (limited to 'lib/torrent.js')
-rw-r--r--lib/torrent.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/torrent.js b/lib/torrent.js
index 45a4f95..4ee7a80 100644
--- a/lib/torrent.js
+++ b/lib/torrent.js
@@ -163,7 +163,7 @@ class Torrent extends EventEmitter {
get progress () { return this.length ? this.downloaded / this.length : 0 }
- get ratio () { return this.uploaded / (this.received || 1) }
+ get ratio () { return this.uploaded / (this.received || this.length) }
get numPeers () { return this.wires.length }