mirror of
https://github.com/oxen-io/lokinet.git
synced 2024-11-15 12:13:24 +00:00
Increase default path timeout from 10min to 20min
This commit is contained in:
parent
f0374eb2b7
commit
230037b9f3
@ -17,7 +17,7 @@ namespace llarp
|
|||||||
/// pad messages to the nearest this many bytes
|
/// pad messages to the nearest this many bytes
|
||||||
constexpr std::size_t pad_size = 128;
|
constexpr std::size_t pad_size = 128;
|
||||||
/// default path lifetime in ms
|
/// default path lifetime in ms
|
||||||
static constexpr auto default_lifetime = 10min;
|
static constexpr auto default_lifetime = 20min;
|
||||||
/// after this many ms a path build times out
|
/// after this many ms a path build times out
|
||||||
static constexpr auto build_timeout = 30s;
|
static constexpr auto build_timeout = 30s;
|
||||||
|
|
||||||
|
@ -75,10 +75,10 @@ namespace llarp
|
|||||||
Endpoint::RegenAndPublishIntroSet(bool forceRebuild)
|
Endpoint::RegenAndPublishIntroSet(bool forceRebuild)
|
||||||
{
|
{
|
||||||
const auto now = llarp::time_now_ms();
|
const auto now = llarp::time_now_ms();
|
||||||
std::set< Introduction > I;
|
std::set< Introduction > introset;
|
||||||
if(!GetCurrentIntroductionsWithFilter(
|
if(!GetCurrentIntroductionsWithFilter(
|
||||||
I, [now](const service::Introduction& intro) -> bool {
|
introset, [now](const service::Introduction& intro) -> bool {
|
||||||
return not intro.ExpiresSoon(now, 2min);
|
return not intro.ExpiresSoon(now, path::default_lifetime * 2);
|
||||||
}))
|
}))
|
||||||
{
|
{
|
||||||
LogWarn("could not publish descriptors for endpoint ", Name(),
|
LogWarn("could not publish descriptors for endpoint ", Name(),
|
||||||
@ -88,7 +88,7 @@ namespace llarp
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
introSet().I.clear();
|
introSet().I.clear();
|
||||||
for(auto& intro : I)
|
for(auto& intro : introset)
|
||||||
{
|
{
|
||||||
introSet().I.emplace_back(std::move(intro));
|
introSet().I.emplace_back(std::move(intro));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user