update timestamp before publishing

This commit is contained in:
orignal 2018-09-21 10:13:18 -04:00
parent 5cac6ca8bb
commit c8f4ace5c4
3 changed files with 13 additions and 7 deletions

View file

@ -497,6 +497,12 @@ namespace i2p
}
}
void RouterContext::UpdateTimestamp (uint64_t ts)
{
if (ts > m_LastUpdateTime + ROUTER_INFO_UPDATE_INTERVAL)
UpdateRouterInfo ();
}
bool RouterContext::Load ()
{
std::ifstream fk (i2p::fs::DataDirPath (ROUTER_KEYS), std::ifstream::in | std::ifstream::binary);