1
0
mirror of https://github.com/PurpleI2P/i2pd.git synced 2025-01-24 06:04:16 +00:00

drop router's buffer after a while without updates

This commit is contained in:
orignal 2025-01-20 18:17:41 -05:00
parent 29a5effabb
commit cba7e5350d

View File

@ -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