mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
update RouterInfo if congestion cap changed
This commit is contained in:
parent
6d7f20961f
commit
46e4f4aea5
3 changed files with 6 additions and 3 deletions
|
@ -1149,14 +1149,16 @@ namespace data
|
|||
SetProperty ("caps", caps);
|
||||
}
|
||||
|
||||
void LocalRouterInfo::SetHighCongestion (bool highCongestion)
|
||||
bool LocalRouterInfo::SetHighCongestion (bool highCongestion)
|
||||
{
|
||||
Congestion c = highCongestion ? eHighCongestion : eLowCongestion;
|
||||
if (c != GetCongestion ())
|
||||
{
|
||||
SetCongestion (c);
|
||||
UpdateCapsProperty ();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void LocalRouterInfo::WriteToStream (std::ostream& s) const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue