mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-22 14:10:54 -04:00
Merge pull request #2285 from jolavillette/pqihandler-bwctrl-bugfix
Fix bug in pqihandler preventing UP BW management when bwctrl service is OFF
This commit is contained in:
commit
8e64a07efc
1 changed files with 1 additions and 8 deletions
|
@ -470,18 +470,11 @@ int pqihandler::UpdateRates()
|
||||||
|
|
||||||
// for our up bandwidth we take into account the max down provided by peers via BwCtrl
|
// for our up bandwidth we take into account the max down provided by peers via BwCtrl
|
||||||
// because we don't want to clog our outqueues, the TCP buffers, and the peers inbound queues
|
// because we don't want to clog our outqueues, the TCP buffers, and the peers inbound queues
|
||||||
|
mod -> pqi -> setMaxRate(false, out_max_bw);
|
||||||
if ((rateMap_it = rateMap.find(mod->pqi->PeerId())) != rateMap.end())
|
if ((rateMap_it = rateMap.find(mod->pqi->PeerId())) != rateMap.end())
|
||||||
{
|
|
||||||
if (rateMap_it->second.mAllowedOut > 0)
|
if (rateMap_it->second.mAllowedOut > 0)
|
||||||
{
|
|
||||||
if (out_max_bw > rateMap_it->second.mAllowedOut)
|
if (out_max_bw > rateMap_it->second.mAllowedOut)
|
||||||
mod -> pqi -> setMaxRate(false, rateMap_it->second.mAllowedOut);
|
mod -> pqi -> setMaxRate(false, rateMap_it->second.mAllowedOut);
|
||||||
else
|
|
||||||
mod -> pqi -> setMaxRate(false, out_max_bw);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
mod -> pqi -> setMaxRate(false, out_max_bw);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef UPDATE_RATES_DEBUG
|
#ifdef UPDATE_RATES_DEBUG
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue