try not killing paths if they get data

use correct mainloop
pull/16/head
Jeff Becker 6 years ago
parent 8ec786a512
commit 79680a4f6b
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05

@ -605,10 +605,12 @@ namespace llarp
Path::HandlePathLatencyMessage(
const llarp::routing::PathLatencyMessage* msg, llarp_router* r)
{
auto now = llarp_time_now_ms();
m_LastRecvMessage = now;
// TODO: reanimate dead paths if they get this message
if(msg->L == m_LastLatencyTestID && _status == ePathEstablished)
{
intro.latency = llarp_time_now_ms() - m_LastLatencyTestTime;
intro.latency = now - m_LastLatencyTestTime;
llarp::LogDebug("path latency is ", intro.latency,
" ms for tx=", TXID(), " rx=", RXID());
m_LastLatencyTestID = 0;

@ -786,7 +786,7 @@ namespace llarp
if(latency >= m_MinPathLatency)
{
// rebuild path next tick
llarp_logic_queue_job(EndpointLogic(), {this, &HandlePathDead});
llarp_logic_queue_job(RouterLogic(), {this, &HandlePathDead});
return true;
}
return false;

Loading…
Cancel
Save