mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-24 01:46:36 +02:00
update local RouterInfo timestamp by timer even in hidden mode
This commit is contained in:
parent
bb531a878d
commit
0fae04f96a
1 changed files with 16 additions and 14 deletions
|
@ -57,11 +57,8 @@ namespace i2p
|
||||||
{
|
{
|
||||||
m_Service.reset (new RouterService);
|
m_Service.reset (new RouterService);
|
||||||
m_Service->Start ();
|
m_Service->Start ();
|
||||||
if (!m_IsHiddenMode)
|
|
||||||
{
|
|
||||||
m_PublishTimer.reset (new boost::asio::deadline_timer (m_Service->GetService ()));
|
m_PublishTimer.reset (new boost::asio::deadline_timer (m_Service->GetService ()));
|
||||||
ScheduleInitialPublish ();
|
ScheduleInitialPublish ();
|
||||||
}
|
|
||||||
m_CongestionUpdateTimer.reset (new boost::asio::deadline_timer (m_Service->GetService ()));
|
m_CongestionUpdateTimer.reset (new boost::asio::deadline_timer (m_Service->GetService ()));
|
||||||
ScheduleCongestionUpdate ();
|
ScheduleCongestionUpdate ();
|
||||||
m_CleanupTimer.reset (new boost::asio::deadline_timer (m_Service->GetService ()));
|
m_CleanupTimer.reset (new boost::asio::deadline_timer (m_Service->GetService ()));
|
||||||
|
@ -1347,6 +1344,9 @@ namespace i2p
|
||||||
void RouterContext::HandlePublishTimer (const boost::system::error_code& ecode)
|
void RouterContext::HandlePublishTimer (const boost::system::error_code& ecode)
|
||||||
{
|
{
|
||||||
if (ecode != boost::asio::error::operation_aborted)
|
if (ecode != boost::asio::error::operation_aborted)
|
||||||
|
{
|
||||||
|
UpdateTimestamp (i2p::util::GetSecondsSinceEpoch ());
|
||||||
|
if (!m_IsHiddenMode)
|
||||||
{
|
{
|
||||||
m_PublishExcluded.clear ();
|
m_PublishExcluded.clear ();
|
||||||
m_PublishReplyToken = 0;
|
m_PublishReplyToken = 0;
|
||||||
|
@ -1355,10 +1355,12 @@ namespace i2p
|
||||||
UpdateStats (); // for floodfill
|
UpdateStats (); // for floodfill
|
||||||
m_PublishExcluded.insert (i2p::context.GetIdentHash ()); // don't publish to ourselves
|
m_PublishExcluded.insert (i2p::context.GetIdentHash ()); // don't publish to ourselves
|
||||||
}
|
}
|
||||||
UpdateTimestamp (i2p::util::GetSecondsSinceEpoch ());
|
|
||||||
Publish ();
|
Publish ();
|
||||||
SchedulePublishResend ();
|
SchedulePublishResend ();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
SchedulePublish ();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void RouterContext::Publish ()
|
void RouterContext::Publish ()
|
||||||
|
|
Loading…
Add table
Reference in a new issue