1
0
mirror of https://github.com/PurpleI2P/i2pd.git synced 2025-02-03 03:44:15 +00:00

peers cleanup time variance

This commit is contained in:
orignal 2025-02-01 09:42:44 -05:00
parent 57aa8b3de8
commit e8f5efd156

View File

@ -1042,7 +1042,7 @@ namespace transport
// if still testing or unknown, repeat peer test
if (ipv4Testing || ipv6Testing)
PeerTest (ipv4Testing, ipv6Testing);
m_PeerCleanupTimer->expires_from_now (boost::posix_time::seconds(3 * SESSION_CREATION_TIMEOUT));
m_PeerCleanupTimer->expires_from_now (boost::posix_time::seconds(2 * SESSION_CREATION_TIMEOUT + m_Rng() % SESSION_CREATION_TIMEOUT));
m_PeerCleanupTimer->async_wait (std::bind (&Transports::HandlePeerCleanupTimer, this, std::placeholders::_1));
}
}