pull/189/head
Jeff Becker 6 years ago
parent f993bd287d
commit 3df8dc0f22
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05

@ -78,8 +78,10 @@ namespace llarp
if(!path)
return true;
auto lastPing = path->LastRemoteActivityAt();
if(lastPing && now > lastPing && now - lastPing > timeout)
if(lastPing == 0 || now > lastPing && now - lastPing > timeout)
return now > m_LastActive && now - m_LastActive > timeout;
else if(lastPing)
return now > lastPing && now - lastPing > timeout;
return lastPing > 0;
}

@ -558,6 +558,7 @@ namespace llarp
llarp::LogWarn("Failed to parse inbound routing message");
return false;
}
m_LastRecvMessage = r->Now();
return true;
}

@ -101,12 +101,8 @@ namespace llarp
r->crypto.xchacha20(buf, pathKey, Y);
if(IsEndpoint(r->pubkey()))
{
if(r->ParseRoutingMessageBuffer(buf, this, info.rxID))
{
m_LastActivity = r->Now();
return true;
}
return false;
m_LastActivity = r->Now();
return r->ParseRoutingMessageBuffer(buf, this, info.rxID);
}
else
{

Loading…
Cancel
Save