diff options
author | Diego Rodriguez Baquero <diego.baquero@pager.com> | 2020-04-02 00:45:56 +0300 |
---|---|---|
committer | Diego Rodriguez Baquero <diego.baquero@pager.com> | 2020-04-02 00:45:56 +0300 |
commit | 9fa526e7cabcfebb68f1144b0b3d4acbc8920b7e (patch) | |
tree | 2a2aedf0b3746f84e3f2920b9af3bc2b1f4fe8ae /lib/torrent.js | |
parent | 67549f83c23e91b8e545d8126a272207535658a9 (diff) |
fix ratio
Diffstat (limited to 'lib/torrent.js')
-rw-r--r-- | lib/torrent.js | 2 |
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 } |