mirror of
https://github.com/oxen-io/lokinet.git
synced 2024-11-11 07:10:36 +00:00
proper shift
This commit is contained in:
parent
f110f3f3ad
commit
62bae2075b
@ -194,6 +194,8 @@ namespace llarp
|
|||||||
ShiftIntroduction(){};
|
ShiftIntroduction(){};
|
||||||
virtual void
|
virtual void
|
||||||
UpdateIntroSet(){};
|
UpdateIntroSet(){};
|
||||||
|
virtual void
|
||||||
|
MarkCurrentIntroBad(){};
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void
|
void
|
||||||
|
@ -1130,6 +1130,12 @@ namespace llarp
|
|||||||
auto path = m_PathSet->GetPathByRouter(remoteIntro.router);
|
auto path = m_PathSet->GetPathByRouter(remoteIntro.router);
|
||||||
if(path)
|
if(path)
|
||||||
{
|
{
|
||||||
|
auto now = llarp_time_now_ms();
|
||||||
|
if(remoteIntro.ExpiresSoon(now))
|
||||||
|
{
|
||||||
|
MarkCurrentIntroBad();
|
||||||
|
ShiftIntroduction();
|
||||||
|
}
|
||||||
routing::PathTransferMessage transfer(msg, remoteIntro.pathID);
|
routing::PathTransferMessage transfer(msg, remoteIntro.pathID);
|
||||||
if(!path->SendRoutingMessage(&transfer, m_Endpoint->Router()))
|
if(!path->SendRoutingMessage(&transfer, m_Endpoint->Router()))
|
||||||
llarp::LogError("Failed to send frame on path");
|
llarp::LogError("Failed to send frame on path");
|
||||||
|
Loading…
Reference in New Issue
Block a user