mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
move router's tags cleanup to router's thread
This commit is contained in:
parent
441e847de8
commit
900153765a
3 changed files with 32 additions and 24 deletions
|
@ -106,7 +106,7 @@ namespace data
|
|||
{
|
||||
i2p::util::SetThreadName("NetDB");
|
||||
|
||||
uint64_t lastManage = 0, lastExploratory = 0, lastManageRequest = 0, lastDestinationCleanup = 0;
|
||||
uint64_t lastManage = 0, lastExploratory = 0, lastManageRequest = 0;
|
||||
uint64_t lastProfilesCleanup = i2p::util::GetSecondsSinceEpoch ();
|
||||
int16_t profilesCleanupVariance = 0;
|
||||
|
||||
|
@ -165,13 +165,6 @@ namespace data
|
|||
lastManage = ts;
|
||||
}
|
||||
|
||||
if (ts - lastDestinationCleanup >= i2p::garlic::INCOMING_TAGS_EXPIRATION_TIMEOUT ||
|
||||
ts + i2p::garlic::INCOMING_TAGS_EXPIRATION_TIMEOUT < lastDestinationCleanup)
|
||||
{
|
||||
i2p::context.CleanupDestination ();
|
||||
lastDestinationCleanup = ts;
|
||||
}
|
||||
|
||||
if (ts - lastProfilesCleanup >= (uint64_t)(i2p::data::PEER_PROFILE_AUTOCLEAN_TIMEOUT + profilesCleanupVariance) ||
|
||||
ts + i2p::data::PEER_PROFILE_AUTOCLEAN_TIMEOUT < lastProfilesCleanup)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue