|
|
|
@ -1330,7 +1330,10 @@ namespace i2p
@@ -1330,7 +1330,10 @@ namespace i2p
|
|
|
|
|
if (ecode != boost::asio::error::operation_aborted) |
|
|
|
|
{ |
|
|
|
|
if (m_RouterInfo.IsReachableBy (i2p::data::RouterInfo::eAllTransports)) |
|
|
|
|
{ |
|
|
|
|
UpdateCongestion (); |
|
|
|
|
HandlePublishTimer (ecode); |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
UpdateTimestamp (i2p::util::GetSecondsSinceEpoch ()); |
|
|
|
@ -1468,6 +1471,13 @@ namespace i2p
@@ -1468,6 +1471,13 @@ namespace i2p
|
|
|
|
|
void RouterContext::HandleCongestionUpdateTimer (const boost::system::error_code& ecode) |
|
|
|
|
{ |
|
|
|
|
if (ecode != boost::asio::error::operation_aborted) |
|
|
|
|
{ |
|
|
|
|
UpdateCongestion (); |
|
|
|
|
ScheduleCongestionUpdate (); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void RouterContext::UpdateCongestion () |
|
|
|
|
{ |
|
|
|
|
auto c = i2p::data::RouterInfo::eLowCongestion; |
|
|
|
|
if (!AcceptsTunnels () || !m_ShareRatio) |
|
|
|
@ -1482,8 +1492,6 @@ namespace i2p
@@ -1482,8 +1492,6 @@ namespace i2p
|
|
|
|
|
} |
|
|
|
|
if (m_RouterInfo.UpdateCongestion (c)) |
|
|
|
|
UpdateRouterInfo (); |
|
|
|
|
ScheduleCongestionUpdate (); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void RouterContext::ScheduleCleanupTimer () |
|
|
|
|