mirror of
https://github.com/webtorrent/bittorrent-tracker.git
synced 2024-12-13 10:56:25 +00:00
Merge pull request #185 from sidd/master
Fix issue where seeders improperly marked as leechers
This commit is contained in:
commit
a32ae8f1b4
@ -24,7 +24,9 @@ function parseHttpRequest (req, opts) {
|
||||
params.port = Number(params.port)
|
||||
if (!params.port) throw new Error('invalid port')
|
||||
|
||||
params.left = Number(params.left) || Infinity
|
||||
params.left = Number(params.left)
|
||||
if (isNaN(params.left)) params.left = Infinity
|
||||
|
||||
params.compact = Number(params.compact) || 0
|
||||
params.numwant = Math.min(
|
||||
Number(params.numwant) || common.DEFAULT_ANNOUNCE_PEERS,
|
||||
|
Loading…
Reference in New Issue
Block a user