mirror of
https://github.com/PurpleI2P/i2pd
synced 2024-11-13 01:20:22 +03:00
don't delete unreachable routers if too few
This commit is contained in:
parent
7246624983
commit
e2a1cd12c3
@ -560,6 +560,9 @@ namespace data
|
|||||||
updatedCount++;
|
updatedCount++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
// make router reachable back if too few routers
|
||||||
|
if (it.second->IsUnreachable () && total - deletedCount < NETDB_MIN_ROUTERS)
|
||||||
|
it.second->SetUnreachable (false);
|
||||||
// find & mark expired routers
|
// find & mark expired routers
|
||||||
if (it.second->UsesIntroducer ())
|
if (it.second->UsesIntroducer ())
|
||||||
{
|
{
|
||||||
@ -575,7 +578,7 @@ namespace data
|
|||||||
// delete RI file
|
// delete RI file
|
||||||
m_Storage.Remove(ident);
|
m_Storage.Remove(ident);
|
||||||
deletedCount++;
|
deletedCount++;
|
||||||
if (total - deletedCount < NETDB_MIN_ROUTERS) checkForExpiration = false;
|
if (total - deletedCount < NETDB_MIN_ROUTERS) checkForExpiration = false;
|
||||||
}
|
}
|
||||||
} // m_RouterInfos iteration
|
} // m_RouterInfos iteration
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user