forked from I2P_Developers/i2p.i2p
* 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:
@ -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?
|
||||
|
Reference in New Issue
Block a user