swap path on inbound convo if expires soon

pull/686/head
Jeff Becker 5 years ago
parent f211ff182a
commit 5874c38b38
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05

@ -1160,10 +1160,16 @@ namespace llarp
continue;
// get path for intro
ForEachPath([&](path::Path_ptr path) {
if(!path->IsReady())
if(path->intro == replyPath)
{
p = path;
return;
if(path->Endpoint() == replyPath.router)
}
if(p && p->ExpiresSoon(now) && path->IsReady()
&& path->intro.router == replyPath.router)
{
p = path;
}
});
if(p)
{

@ -98,6 +98,7 @@ namespace llarp
LogInfo("introset is old, dropping");
return true;
}
auto now = Now();
if(i->IsExpired(now))
{
@ -105,7 +106,6 @@ namespace llarp
return true;
}
currentIntroSet = *i;
if(!ShiftIntroduction())
{
LogWarn("failed to pick new intro during introset update");

Loading…
Cancel
Save