set send timeout to 5 seconds for exits

pull/1319/head
jeff 4 years ago
parent d39ed26ff0
commit 39f5e7213f

@ -14,6 +14,7 @@
#include <router/abstractrouter.hpp>
#include <service/context.hpp>
#include <service/endpoint_state.hpp>
#include <service/outbound_context.hpp>
#include <util/meta/memfn.hpp>
#include <util/thread/logic.hpp>
#include <nodedb.hpp>
@ -793,7 +794,11 @@ namespace llarp
MarkAddressOutbound(addr);
EnsurePathToService(
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);
},
1s);

Loading…
Cancel
Save