Merge pull request #1623 from majestrate/dont-use-non-tested-paths-2021-05-03

dont use non tested paths
pull/1625/head
Jeff 3 years ago committed by GitHub
commit 26e182955c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -131,7 +131,7 @@ namespace llarp
m_Resolver->Restart();
}
constexpr auto DefaultAlignmentTimeout = 10s;
constexpr auto DefaultAlignmentTimeout = 15s;
bool
TunEndpoint::Configure(const NetworkConfig& conf, const DnsConfig& dnsConf)

@ -156,7 +156,8 @@ namespace llarp
{
if (chosen == nullptr)
chosen = itr->second;
else if (chosen->intro.latency > itr->second->intro.latency)
else if (
chosen->intro.latency != 0s and chosen->intro.latency > itr->second->intro.latency)
chosen = itr->second;
}
}
@ -429,7 +430,7 @@ namespace llarp
llarp_time_t minLatency = 30s;
for (const auto& path : established)
{
if (path->intro.latency < minLatency)
if (path->intro.latency < minLatency and path->intro.latency != 0s)
{
minLatency = path->intro.latency;
chosen = path;

Loading…
Cancel
Save