mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-13 08:11:11 +00:00
fixed race condition
This commit is contained in:
parent
454fa9ee9b
commit
3683ec6a95
@ -271,7 +271,10 @@ namespace data
|
||||
if (r->IsNewer (buf, len))
|
||||
{
|
||||
bool wasFloodfill = r->IsFloodfill ();
|
||||
r->Update (buf, len);
|
||||
{
|
||||
std::unique_lock<std::mutex> l(m_RouterInfosMutex);
|
||||
r->Update (buf, len);
|
||||
}
|
||||
LogPrint (eLogInfo, "NetDb: RouterInfo updated: ", ident.ToBase64());
|
||||
if (wasFloodfill != r->IsFloodfill ()) // if floodfill status updated
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user