mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-31 13:14:13 +00:00
increase request timeout
This commit is contained in:
parent
f980277552
commit
1b23aa2d7b
@ -149,7 +149,7 @@ namespace data
|
|||||||
if (!i2p::transport::transports.IsOnline ()) continue; // don't manage netdb when offline
|
if (!i2p::transport::transports.IsOnline ()) continue; // don't manage netdb when offline
|
||||||
|
|
||||||
uint64_t ts = i2p::util::GetSecondsSinceEpoch ();
|
uint64_t ts = i2p::util::GetSecondsSinceEpoch ();
|
||||||
if (ts - lastManageRequest >= 15 || ts + 15 < lastManageRequest) // manage requests every 15 seconds
|
if (ts - lastManageRequest >= MANAGE_REQUESTS_INTERVAL || ts + MANAGE_REQUESTS_INTERVAL < lastManageRequest) // manage requests every 15 seconds
|
||||||
{
|
{
|
||||||
m_Requests.ManageRequests ();
|
m_Requests.ManageRequests ();
|
||||||
lastManageRequest = ts;
|
lastManageRequest = ts;
|
||||||
|
@ -21,8 +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 MIN_REQUEST_TIME = 5; // in seconds
|
const uint64_t MIN_REQUEST_TIME = 5; // in seconds
|
||||||
const uint64_t MAX_REQUEST_TIME = 60; // in seconds
|
const uint64_t MAX_REQUEST_TIME = MAX_NUM_REQUEST_ATTEMPTS*MANAGE_REQUESTS_INTERVAL;
|
||||||
|
|
||||||
class RequestedDestination
|
class RequestedDestination
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user