Browse Source

fixed race condition

pull/1786/head
orignal 2 years ago
parent
commit
3683ec6a95
  1. 3
      libi2pd/NetDb.cpp

3
libi2pd/NetDb.cpp

@ -271,7 +271,10 @@ namespace data @@ -271,7 +271,10 @@ namespace data
if (r->IsNewer (buf, len))
{
bool wasFloodfill = r->IsFloodfill ();
{
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…
Cancel
Save