mirror of
https://github.com/oxen-io/lokinet.git
synced 2024-11-17 15:25:35 +00:00
Merge pull request #1623 from majestrate/dont-use-non-tested-paths-2021-05-03
dont use non tested paths
This commit is contained in:
commit
26e182955c
@ -131,7 +131,7 @@ namespace llarp
|
|||||||
m_Resolver->Restart();
|
m_Resolver->Restart();
|
||||||
}
|
}
|
||||||
|
|
||||||
constexpr auto DefaultAlignmentTimeout = 10s;
|
constexpr auto DefaultAlignmentTimeout = 15s;
|
||||||
|
|
||||||
bool
|
bool
|
||||||
TunEndpoint::Configure(const NetworkConfig& conf, const DnsConfig& dnsConf)
|
TunEndpoint::Configure(const NetworkConfig& conf, const DnsConfig& dnsConf)
|
||||||
|
@ -156,7 +156,8 @@ namespace llarp
|
|||||||
{
|
{
|
||||||
if (chosen == nullptr)
|
if (chosen == nullptr)
|
||||||
chosen = itr->second;
|
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;
|
chosen = itr->second;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -429,7 +430,7 @@ namespace llarp
|
|||||||
llarp_time_t minLatency = 30s;
|
llarp_time_t minLatency = 30s;
|
||||||
for (const auto& path : established)
|
for (const auto& path : established)
|
||||||
{
|
{
|
||||||
if (path->intro.latency < minLatency)
|
if (path->intro.latency < minLatency and path->intro.latency != 0s)
|
||||||
{
|
{
|
||||||
minLatency = path->intro.latency;
|
minLatency = path->intro.latency;
|
||||||
chosen = path;
|
chosen = path;
|
||||||
|
Loading…
Reference in New Issue
Block a user