dont change send timeout for exits from tun handler as that screws with consistency in testing.

improve log messages, provide more info
pull/1658/head
Jeff Becker 3 years ago
parent a94c100e7b
commit b03d17bc8e
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05

@ -923,12 +923,13 @@ namespace llarp
MarkAddressOutbound(addr);
EnsurePathToService(
addr,
[addr, pkt, self = this](service::Address, service::OutboundContext* ctx) {
if (ctx)
[pkt](service::Address addr, service::OutboundContext* ctx) {
if(ctx)
{
ctx->sendTimeout = 5s;
ctx->SendPacketToRemote(pkt.ConstBuffer(), service::ProtocolType::Exit);
return;
}
self->SendToOrQueue(addr, pkt.ConstBuffer(), service::ProtocolType::Exit);
LogWarn("cannot ensure path to exit ", addr, " so we drop some packets");
},
PathAlignmentTimeout());
return;
@ -968,10 +969,13 @@ namespace llarp
return;
EnsurePathToService(
*ptr,
[pkt, type, this](auto addr, auto* ctx) {
[pkt, type](auto addr, auto* ctx) {
if (ctx == nullptr)
{
LogWarn("failed to ensure path to ", addr, " so we drop some packets");
return;
SendToOrQueue(addr, pkt.ConstBuffer(), type);
}
ctx->SendPacketToRemote(pkt.ConstBuffer(), type);
},
PathAlignmentTimeout());
return;

@ -1264,7 +1264,7 @@ namespace llarp
if (!frame.Verify(si))
return false;
// remove convotag it doesn't exist
LogWarn("remove convotag T=", frame.T, " R=", frame.R);
LogWarn("remove convotag T=", frame.T, " R=", frame.R, " from ", si.Addr());
RemoveConvoTag(frame.T);
return true;
}

Loading…
Cancel
Save