From 7aacc973515cf539de5a2cd9fa796b4466d7e21d Mon Sep 17 00:00:00 2001 From: orignal Date: Tue, 7 May 2024 11:58:17 -0400 Subject: [PATCH] initialize requests before reseeds --- libi2pd/NetDb.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libi2pd/NetDb.cpp b/libi2pd/NetDb.cpp index f4d450fd..47aeb349 100644 --- a/libi2pd/NetDb.cpp +++ b/libi2pd/NetDb.cpp @@ -58,6 +58,12 @@ namespace data m_Families.LoadCertificates (); Load (); + if (!m_Requests) + { + m_Requests = std::make_shared(); + 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 { @@ -79,12 +85,6 @@ namespace data m_Floodfills.Insert (i2p::context.GetSharedRouterInfo ()); i2p::config::GetOption("persist.profiles", m_PersistProfiles); - - if (!m_Requests) - { - m_Requests = std::make_shared(); - m_Requests->Start (); - } m_IsRunning = true; m_Thread = new std::thread (std::bind (&NetDb::Run, this));