mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 03:37:49 +02:00
update timestamp before publishing
This commit is contained in:
parent
5cac6ca8bb
commit
c8f4ace5c4
3 changed files with 13 additions and 7 deletions
|
@ -130,18 +130,17 @@ namespace data
|
|||
lastDestinationCleanup = ts;
|
||||
}
|
||||
|
||||
if (ts - lastPublish >= NETDB_PUBLISH_INTERVAL && !m_HiddenMode) // publish
|
||||
if (ts - lastPublish >= NETDB_PUBLISH_INTERVAL) // update timestamp and publish
|
||||
{
|
||||
Publish ();
|
||||
i2p::context.UpdateTimestamp (ts);
|
||||
if (!m_HiddenMode) Publish ();
|
||||
lastPublish = ts;
|
||||
}
|
||||
if (ts - lastExploratory >= 30) // exploratory every 30 seconds
|
||||
{
|
||||
auto numRouters = m_RouterInfos.size ();
|
||||
if (numRouters == 0)
|
||||
{
|
||||
throw std::runtime_error("No known routers, reseed seems to be totally failed");
|
||||
}
|
||||
if (!numRouters)
|
||||
throw std::runtime_error("No known routers, reseed seems to be totally failed");
|
||||
else // we have peers now
|
||||
m_FloodfillBootstrap = nullptr;
|
||||
if (numRouters < 2500 || ts - lastExploratory >= 90)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue