mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 21:37:17 +01:00
don't drop too old router if low uptime
This commit is contained in:
parent
c8958d71a2
commit
fd2b15fe81
|
@ -295,7 +295,8 @@ namespace data
|
||||||
{
|
{
|
||||||
auto mts = i2p::util::GetMillisecondsSinceEpoch ();
|
auto mts = i2p::util::GetMillisecondsSinceEpoch ();
|
||||||
isValid = mts + NETDB_EXPIRATION_TIMEOUT_THRESHOLD*1000LL > r->GetTimestamp () && // from future
|
isValid = mts + NETDB_EXPIRATION_TIMEOUT_THRESHOLD*1000LL > r->GetTimestamp () && // from future
|
||||||
mts < r->GetTimestamp () + NETDB_MAX_EXPIRATION_TIMEOUT*1000LL; // too old
|
(mts < r->GetTimestamp () + NETDB_MAX_EXPIRATION_TIMEOUT*1000LL || // too old
|
||||||
|
context.GetUptime () < NETDB_CHECK_FOR_EXPIRATION_UPTIME/10); // enough uptime
|
||||||
}
|
}
|
||||||
if (isValid)
|
if (isValid)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue