Browse Source

don't drop too old router if low uptime

pull/2101/head
orignal 2 months ago
parent
commit
fd2b15fe81
  1. 3
      libi2pd/NetDb.cpp

3
libi2pd/NetDb.cpp

@ -295,7 +295,8 @@ namespace data @@ -295,7 +295,8 @@ namespace data
{
auto mts = i2p::util::GetMillisecondsSinceEpoch ();
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)
{

Loading…
Cancel
Save