fixed bug in estimation of next FT rate that caused downloads to stuck for a while

This commit is contained in:
csoler 2016-09-22 13:44:53 +02:00
parent af69790db6
commit e6e95829bc

View File

@ -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;