Browse Source

initialize requests before reseeds

pull/1941/merge
orignal 6 months ago
parent
commit
7aacc97351
  1. 12
      libi2pd/NetDb.cpp

12
libi2pd/NetDb.cpp

@ -58,6 +58,12 @@ namespace data @@ -58,6 +58,12 @@ namespace data
m_Families.LoadCertificates ();
Load ();
if (!m_Requests)
{
m_Requests = std::make_shared<NetDbRequests>();
m_Requests->Start ();
}
uint16_t threshold; i2p::config::GetOption("reseed.threshold", threshold);
if (m_RouterInfos.size () < threshold || m_Floodfills.GetSize () < NETDB_MIN_FLOODFILLS) // reseed if # of router less than threshold or too few floodfiils
{
@ -80,12 +86,6 @@ namespace data @@ -80,12 +86,6 @@ namespace data
i2p::config::GetOption("persist.profiles", m_PersistProfiles);
if (!m_Requests)
{
m_Requests = std::make_shared<NetDbRequests>();
m_Requests->Start ();
}
m_IsRunning = true;
m_Thread = new std::thread (std::bind (&NetDb::Run, this));
}

Loading…
Cancel
Save