mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 06:06:10 -04:00
fixed bug in estimation of next FT rate that caused downloads to stuck for a while
This commit is contained in:
parent
af69790db6
commit
e6e95829bc
1 changed files with 1 additions and 1 deletions
|
@ -739,7 +739,7 @@ bool ftTransferModule::locked_tickPeerTransfer(peerInfo &info)
|
|||
#endif
|
||||
/* update rate */
|
||||
|
||||
if(info.lastTransfers > 0 || ageReq > 2)
|
||||
if( (info.lastTransfers > 0 && ageReq > 0) || ageReq > 2)
|
||||
{
|
||||
info.actualRate = info.actualRate * 0.75 + 0.25 * info.lastTransfers / (float)ageReq;
|
||||
info.lastTransfers = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue