mirror of
https://github.com/oxen-io/lokinet.git
synced 2024-11-11 07:10:36 +00:00
set send timeout to 5 seconds for exits
This commit is contained in:
parent
d39ed26ff0
commit
39f5e7213f
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user