Skip to content

Commit

Permalink
drop updated routers from future
Browse files Browse the repository at this point in the history
  • Loading branch information
orignal committed Jan 6, 2024
1 parent c5cab05 commit 5cf1961
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions libi2pd/NetDb.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2013-2023, The PurpleI2P Project
* Copyright (c) 2013-2024, The PurpleI2P Project
*
* This file is part of Purple i2pd project and licensed under BSD3
*
Expand Down Expand Up @@ -247,9 +247,10 @@ namespace data
m_Requests.RequestComplete (ident, r);
return r;
}
if (r->IsUnreachable ())
if (r->IsUnreachable () ||
i2p::util::GetMillisecondsSinceEpoch () + NETDB_EXPIRATION_TIMEOUT_THRESHOLD*1000LL < r->GetTimestamp ())
{
// delete router as invalid after update
// delete router as invalid or from future after update
m_RouterInfos.erase (ident);
if (wasFloodfill)
{
Expand Down

0 comments on commit 5cf1961

Please sign in to comment.