From 3393b5a5a767ea6e242bff4894de2380ccf0d8d0 Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Thu, 17 Jun 2021 08:08:46 -0400 Subject: [PATCH] make it so lookups dont time out --- llarp/service/endpoint.cpp | 2 +- llarp/service/hidden_service_address_lookup.hpp | 3 +++ llarp/service/outbound_context.cpp | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/llarp/service/endpoint.cpp b/llarp/service/endpoint.cpp index 72a0a02cf..6577bc24c 100644 --- a/llarp/service/endpoint.cpp +++ b/llarp/service/endpoint.cpp @@ -1465,7 +1465,7 @@ namespace llarp path->Endpoint(), order, GenTXID(), - timeout + (2 * path->intro.latency)); + timeout + (2 * path->intro.latency) + IntrosetLookupGraceInterval); LogInfo( "doing lookup for ", remote, diff --git a/llarp/service/hidden_service_address_lookup.hpp b/llarp/service/hidden_service_address_lookup.hpp index 2e656a885..164b365d2 100644 --- a/llarp/service/hidden_service_address_lookup.hpp +++ b/llarp/service/hidden_service_address_lookup.hpp @@ -8,6 +8,9 @@ namespace llarp { namespace service { + /// interval for which we will add to lookup timeout interval + constexpr auto IntrosetLookupGraceInterval = 20s; + struct Endpoint; struct HiddenServiceAddressLookup : public IServiceLookup { diff --git a/llarp/service/outbound_context.cpp b/llarp/service/outbound_context.cpp index 71996e12c..5103ae257 100644 --- a/llarp/service/outbound_context.cpp +++ b/llarp/service/outbound_context.cpp @@ -289,7 +289,7 @@ namespace llarp path->Endpoint(), relayOrder, m_Endpoint->GenTXID(), - (IntrosetUpdateInterval / 2) + (2 * path->intro.latency)); + (IntrosetUpdateInterval / 2) + (2 * path->intro.latency) + IntrosetLookupGraceInterval); relayOrder++; if (job->SendRequestViaPath(path, m_Endpoint->Router())) updatingIntroSet = true;