Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lower max requests of webseeds to real value #663

Merged
merged 2 commits into from Mar 9, 2016
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

Next

Lower max requests of webseeds to real value

`getPipelineLength` adds 2 extra more requests possible to each wire.

In the case of a webseed, if it already has speed, let the webseed handle its real max requests.
  • Loading branch information
DiegoRBaquero committed Mar 9, 2016
commit 1b6b6e44c7e636043372795d840848e5a7ec71f7
@@ -1127,6 +1127,7 @@ Torrent.prototype._request = function (wire, index, hotswap) {
if (self.bitfield.get(index)) return false

var maxOutstandingRequests = getPipelineLength(wire, PIPELINE_MAX_DURATION)
if (isWebSeed && maxOutstandingRequests > 2) maxOutstandingRequests -= 2; // A webseed will handle it's real max requests
if (numRequests >= maxOutstandingRequests) return false
// var endGame = (wire.requests.length === 0 && self.store.numMissing < 30)

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.