mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2024-11-04 06:00:37 +00:00
don't create profile for every new non-floodfill
This commit is contained in:
parent
eaca435a5b
commit
b8a99878b6
@ -315,7 +315,7 @@ namespace data
|
||||
else
|
||||
{
|
||||
r = std::make_shared<RouterInfo> (buf, len);
|
||||
if (!r->IsUnreachable () && r->HasValidAddresses () && !r->GetProfile ()->IsUnreachable () &&
|
||||
if (!r->IsUnreachable () && r->HasValidAddresses () && (!r->IsFloodfill () || !r->GetProfile ()->IsUnreachable ()) &&
|
||||
i2p::util::GetMillisecondsSinceEpoch () + NETDB_EXPIRATION_TIMEOUT_THRESHOLD*1000LL > r->GetTimestamp ())
|
||||
{
|
||||
bool inserted = false;
|
||||
@ -1398,7 +1398,7 @@ namespace data
|
||||
std::unique_lock<std::mutex> l(m_FloodfillsMutex);
|
||||
for (const auto& it: m_Floodfills)
|
||||
{
|
||||
if (!it->IsUnreachable ())
|
||||
if (!it->IsUnreachable () && !it->GetProfile ()->IsUnreachable ())
|
||||
{
|
||||
XORMetric m = destKey ^ it->GetIdentHash ();
|
||||
if (closeThanUsOnly && ourMetric < m) continue;
|
||||
|
Loading…
Reference in New Issue
Block a user