1
0
mirror of https://github.com/PurpleI2P/i2pd.git synced 2025-03-10 01:01:02 +00:00

12 hours expiration if more than 2500 routers

This commit is contained in:
orignal 2016-02-15 21:40:49 -05:00
parent e1995b5c70
commit 2003b34036

View File

@ -375,6 +375,14 @@ namespace data
total--;
}
}
else if (total > 2500)
{
if (ts > it.second->GetTimestamp () + 12*3600*1000LL) // 12 hours
{
it.second->SetUnreachable (true);
total--;
}
}
else if (total > 300)
{
if (ts > it.second->GetTimestamp () + 30*3600*1000LL) // 30 hours