mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-25 06:40:58 -04:00
removed the "emergency shutdown" feature in tickPeerTransfer(), that would stuck some transfers on the lowest rate 128 B/s. On my tests this emergency shutdown is never needed.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3676 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
630e7dfe6b
commit
af8ad4e862
1 changed files with 16 additions and 11 deletions
|
@ -871,17 +871,22 @@ bool ftTransferModule::locked_tickPeerTransfer(peerInfo &info)
|
||||||
/* emergency shutdown if we are stuck in x 1.25 mode
|
/* emergency shutdown if we are stuck in x 1.25 mode
|
||||||
* probably not needed
|
* probably not needed
|
||||||
*/
|
*/
|
||||||
if ((info.rttActive) && (ts - info.rttStart > FT_TM_SLOW_RTT))
|
|
||||||
{
|
// csoler: I commented this out because that tends to make some sources
|
||||||
if (info.mRateIncrease > 0)
|
// get stuck into minimal 128 B/s rate, when multiple sources are competiting into the
|
||||||
{
|
// same limited bandwidth. I don't think this emergency shutdown is necessary anyway.
|
||||||
#ifdef FT_DEBUG
|
//
|
||||||
std::cerr << "!!! - Emergency shutdown because rttActive is true, and age is " << ts - info.rttStart << std::endl ;
|
// if ((info.rttActive) && (ts - info.rttStart > FT_TM_SLOW_RTT))
|
||||||
#endif
|
// {
|
||||||
info.mRateIncrease = 0;
|
// if (info.mRateIncrease > 0)
|
||||||
info.rttActive = false ; // I've added this to avoid being stuck when rttActive is true
|
// {
|
||||||
}
|
//#ifdef FT_DEBUG
|
||||||
}
|
// std::cerr << "!!! - Emergency shutdown because rttActive is true, and age is " << ts - info.rttStart << std::endl ;
|
||||||
|
//#endif
|
||||||
|
// info.mRateIncrease = 0;
|
||||||
|
// info.rttActive = false ; // I've added this to avoid being stuck when rttActive is true
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
/* request at more than current rate */
|
/* request at more than current rate */
|
||||||
uint32_t next_req = info.actualRate * (1.0 + info.mRateIncrease);
|
uint32_t next_req = info.actualRate * (1.0 + info.mRateIncrease);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue