set send timeout to 5 seconds for exits

This commit is contained in:
jeff 2020-08-25 14:57:15 -04:00
parent d39ed26ff0
commit 39f5e7213f

View File

@ -14,6 +14,7 @@
#include <router/abstractrouter.hpp> #include <router/abstractrouter.hpp>
#include <service/context.hpp> #include <service/context.hpp>
#include <service/endpoint_state.hpp> #include <service/endpoint_state.hpp>
#include <service/outbound_context.hpp>
#include <util/meta/memfn.hpp> #include <util/meta/memfn.hpp>
#include <util/thread/logic.hpp> #include <util/thread/logic.hpp>
#include <nodedb.hpp> #include <nodedb.hpp>
@ -793,7 +794,11 @@ namespace llarp
MarkAddressOutbound(addr); MarkAddressOutbound(addr);
EnsurePathToService( EnsurePathToService(
addr, addr,
[addr, pkt, self = this](service::Address, service::OutboundContext*) { [addr, pkt, self = this](service::Address, service::OutboundContext* ctx) {
if (ctx)
{
ctx->sendTimeout = 5s;
}
self->SendToServiceOrQueue(addr, pkt.ConstBuffer(), service::eProtocolExit); self->SendToServiceOrQueue(addr, pkt.ConstBuffer(), service::eProtocolExit);
}, },
1s); 1s);