mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-07 06:09:42 +00:00
publish congestion cap G
This commit is contained in:
@@ -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 ();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user