pull/90/head
Jeff Becker 6 years ago
parent 485eaa9995
commit 0a1712924f
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05

@ -124,7 +124,8 @@ namespace llarp
return msg.PutBuffer(pktbuf);
}
bool Endpoint::FlushInboundTraffic()
bool
Endpoint::FlushInboundTraffic()
{
auto path = GetCurrentPath();
bool sent = m_DownstreamQueue.size() == 0;

@ -117,7 +117,8 @@ namespace llarp
return back.PutBuffer(buf);
}
bool BaseSession::FlushUpstreamTraffic()
bool
BaseSession::FlushUpstreamTraffic()
{
auto path = PickRandomEstablishedPath(llarp::path::ePathRoleExit);
if(!path)

@ -797,8 +797,12 @@ namespace llarp
return false;
MarkActive(r->Now());
// handle traffic if we have a handler
return m_ExitTrafficHandler
&& m_ExitTrafficHandler(this, llarp::ConstBuffer(msg->X));
if(!m_ExitTrafficHandler)
return false;
bool sent = msg->X.size() > 0;
for(const auto & pkt : msg->X)
m_ExitTrafficHandler(this, pkt.Buffer());
return sent;
}
} // namespace path

Loading…
Cancel
Save