publish congestion cap G

This commit is contained in:
orignal 2023-04-02 11:27:51 -04:00
parent b42be2b391
commit b8032e7fbf
3 changed files with 10 additions and 11 deletions

View file

@ -1090,6 +1090,8 @@ namespace i2p
UpdateSSU2Keys ();
updated = true;
}
if (m_RouterInfo.UpdateCongestion (i2p::data::RouterInfo::eLowCongestion))
updated = true;
if (updated)
UpdateRouterInfo ();
@ -1398,7 +1400,12 @@ namespace i2p
{
if (ecode != boost::asio::error::operation_aborted)
{
if (m_RouterInfo.SetHighCongestion (IsHighCongestion ()))
auto c = i2p::data::RouterInfo::eLowCongestion;
if (!AcceptsTunnels ())
c = i2p::data::RouterInfo::eRejectAll;
else if (IsHighCongestion ())
c = i2p::data::RouterInfo::eHighCongestion;
if (m_RouterInfo.UpdateCongestion (c))
UpdateRouterInfo ();
ScheduleCongestionUpdate ();
}