pull/448/head
Jeff Becker 5 years ago
parent 9e531c026c
commit 714f5c6b5e
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05

@ -360,11 +360,11 @@ namespace llarp
if(arg->error_code == UTP_ETIMEDOUT)
{
link->HandleTimeout(session);
utp_close(arg->socket);
}
else
session->Close();
}
utp_close(arg->socket);
return 0;
}

@ -1487,7 +1487,7 @@ namespace llarp
}
bool
Endpoint::OutboundContext::ShiftIntroduction()
Endpoint::OutboundContext::ShiftIntroduction(bool rebuild)
{
bool success = false;
auto now = Now();
@ -1522,7 +1522,7 @@ namespace llarp
break;
}
}
if(shifted)
if(shifted && rebuild)
{
lastShift = now;
BuildOneAlignedTo(m_NextIntro.router);
@ -1858,8 +1858,12 @@ namespace llarp
}
else if(router->routerProfiling().IsBad(m_NextIntro.router))
{
llarp::LogError("bad intro chosen, not selecting hop");
return false;
if(!ShiftIntroduction(false))
{
llarp::LogError("bad intro chosen, not selecting hop");
return false;
}
return db->Get(m_NextIntro.router, cur);
}
else
{

@ -239,8 +239,9 @@ namespace llarp
bool markedBad = false;
virtual bool
ShiftIntroduction()
ShiftIntroduction(bool rebuild = true)
{
(void)rebuild;
return true;
};
@ -288,7 +289,7 @@ namespace llarp
/// update the current selected intro to be a new best introduction
/// return true if we have changed intros
bool
ShiftIntroduction() override;
ShiftIntroduction(bool rebuild = true) override;
/// mark the current remote intro as bad
bool

Loading…
Cancel
Save