Skip to content

Commit

Permalink
drop router's buffer after a while without updates
Browse files Browse the repository at this point in the history
  • Loading branch information
orignal committed Jan 20, 2025
1 parent 29a5eff commit cba7e53
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libi2pd/NetDb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -683,6 +683,10 @@ namespace data
updatedCount++;
continue;
}
else if (r->GetBuffer () && ts > r->GetTimestamp () + NETDB_MIN_EXPIRATION_TIMEOUT*1000LL)
// since update was long time ago we assume that router is not connected anymore
r->ScheduleBufferToDelete ();

if (r->GetProfile ()->IsUnreachable ())
r->SetUnreachable (true);
// make router reachable back if too few routers or floodfills
Expand Down

0 comments on commit cba7e53

Please sign in to comment.