From c9a4c77fb93f9927269e662f21b30cbf45dfc558 Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Fri, 8 Mar 2019 09:36:24 -0500 Subject: [PATCH] better chill with path building --- llarp/service/endpoint.cpp | 8 ++++++++ llarp/service/endpoint.hpp | 3 +++ 2 files changed, 11 insertions(+) diff --git a/llarp/service/endpoint.cpp b/llarp/service/endpoint.cpp index 60c6688f8..9daf9c202 100644 --- a/llarp/service/endpoint.cpp +++ b/llarp/service/endpoint.cpp @@ -1826,6 +1826,14 @@ namespace llarp { if(markedBad) return false; + if(path::Builder::ShouldBuildMore(now)) + return true; + return !ReadyToSend(); + } + + bool + Endpoint::ShouldBuildMore(llarp_time_t now) const + { bool should = path::Builder::ShouldBuildMore(now); // determine newest intro Introduction intro; diff --git a/llarp/service/endpoint.hpp b/llarp/service/endpoint.hpp index 342417120..f03443523 100644 --- a/llarp/service/endpoint.hpp +++ b/llarp/service/endpoint.hpp @@ -261,6 +261,9 @@ namespace llarp static void HandlePathDead(void*); + bool + ShouldBuildMore(llarp_time_t now) const override; + /// context needed to initiate an outbound hidden service session struct OutboundContext : public path::Builder, public SendContext {