* i2psnark:

- Limit number of parallel requests of a single piece when in the end game
      - Shorten and weight the speed tracker so the display is more
        reflective of current speed
This commit is contained in:
zzz
2010-11-01 14:35:01 +00:00
parent 8d13bcbac0
commit 3678aa157e
5 changed files with 77 additions and 44 deletions

View File

@ -470,6 +470,18 @@ class PeerState
}
}
/**
* Are we currently requesting the piece?
* @since 0.8.1
*/
synchronized boolean isRequesting(int piece) {
for (Request req : outstandingRequests) {
if (req.piece == piece)
return true;
}
return false;
}
/**
* Starts or resumes requesting pieces.
* @param resend should we resend outstanding requests?