mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
insert previously ecluded floodfill back when connected
This commit is contained in:
parent
720ffa8a31
commit
77bb7432bc
4 changed files with 40 additions and 11 deletions
|
@ -298,7 +298,7 @@ namespace data
|
|||
if (m_Floodfills.GetSize () < NETDB_NUM_FLOODFILLS_THRESHOLD || r->GetProfile ()->IsReal ())
|
||||
m_Floodfills.Insert (r);
|
||||
else
|
||||
r->ResetFloodFill ();
|
||||
r->ResetFloodfill ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -333,7 +333,7 @@ namespace data
|
|||
m_Floodfills.Insert (r);
|
||||
}
|
||||
else
|
||||
r->ResetFloodFill ();
|
||||
r->ResetFloodfill ();
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -458,7 +458,16 @@ namespace data
|
|||
r->SetUnreachable (unreachable);
|
||||
auto profile = r->GetProfile ();
|
||||
if (profile)
|
||||
{
|
||||
profile->Unreachable (unreachable);
|
||||
if (!unreachable && r->IsDeclaredFloodfill () && !r->IsFloodfill () &&
|
||||
r->IsEligibleFloodfill () && profile->IsReal ())
|
||||
{
|
||||
// enable previously disabled floodfill
|
||||
std::lock_guard<std::mutex> l(m_FloodfillsMutex);
|
||||
m_Floodfills.Insert (r);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue