make serivce::Endpoint::EnsurePathToService have a default timeout as a named constant.

pull/1822/head
Jeff 3 years ago
parent 301b19bd0f
commit 776e9227fd
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05

@ -512,8 +512,7 @@ namespace llarp::rpc
}
onGoodResult(result.reason);
});
},
2s);
});
};
if (exit.has_value())
{

@ -323,10 +323,15 @@ namespace llarp
// nullptr if the path was not made before the timeout
using PathEnsureHook = std::function<void(Address, OutboundContext*)>;
static constexpr auto DefaultPathEnsureTimeout = 2s;
/// return false if we have already called this function before for this
/// address
bool
EnsurePathToService(const Address remote, PathEnsureHook h, llarp_time_t timeoutMS);
EnsurePathToService(
const Address remote,
PathEnsureHook h,
llarp_time_t timeoutMS = DefaultPathEnsureTimeout);
using SNodeEnsureHook = std::function<void(const RouterID, exit::BaseSession_ptr, ConvoTag)>;

Loading…
Cancel
Save