Browse Source

manage netDb requests more frequently

pull/2059/head
Vort 8 months ago
parent
commit
6592fab41c
  1. 4
      libi2pd/NetDb.cpp
  2. 4
      libi2pd/NetDbRequests.h

4
libi2pd/NetDb.cpp

@ -114,7 +114,7 @@ namespace data
{ {
try try
{ {
auto msg = m_Queue.GetNextWithTimeout (15000); // 15 sec auto msg = m_Queue.GetNextWithTimeout (1000); // 1 sec
if (msg) if (msg)
{ {
int numMsgs = 0; int numMsgs = 0;
@ -467,7 +467,7 @@ namespace data
return; return;
} }
m_FloodfillBootstrap = ri; m_FloodfillBootstrap = ri;
ReseedFromFloodfill(*ri); //ReseedFromFloodfill(*ri);
// don't try reseed servers if trying to bootstrap from floodfill // don't try reseed servers if trying to bootstrap from floodfill
return; return;
} }

4
libi2pd/NetDbRequests.h

@ -21,9 +21,9 @@ namespace i2p
namespace data namespace data
{ {
const size_t MAX_NUM_REQUEST_ATTEMPTS = 7; const size_t MAX_NUM_REQUEST_ATTEMPTS = 7;
const uint64_t MANAGE_REQUESTS_INTERVAL = 15; // in seconds const uint64_t MANAGE_REQUESTS_INTERVAL = 1; // in seconds
const uint64_t MIN_REQUEST_TIME = 5; // in seconds const uint64_t MIN_REQUEST_TIME = 5; // in seconds
const uint64_t MAX_REQUEST_TIME = MAX_NUM_REQUEST_ATTEMPTS*MANAGE_REQUESTS_INTERVAL; const uint64_t MAX_REQUEST_TIME = MAX_NUM_REQUEST_ATTEMPTS * (MIN_REQUEST_TIME + MANAGE_REQUESTS_INTERVAL);
class RequestedDestination class RequestedDestination
{ {

Loading…
Cancel
Save