diff --git a/include/llarp/service/endpoint.hpp b/include/llarp/service/endpoint.hpp index 3118bb25f..f8280319d 100644 --- a/include/llarp/service/endpoint.hpp +++ b/include/llarp/service/endpoint.hpp @@ -194,6 +194,8 @@ namespace llarp ShiftIntroduction(){}; virtual void UpdateIntroSet(){}; + virtual void + MarkCurrentIntroBad(){}; private: void diff --git a/llarp/service/endpoint.cpp b/llarp/service/endpoint.cpp index 939c84647..114960484 100644 --- a/llarp/service/endpoint.cpp +++ b/llarp/service/endpoint.cpp @@ -1130,6 +1130,12 @@ namespace llarp auto path = m_PathSet->GetPathByRouter(remoteIntro.router); if(path) { + auto now = llarp_time_now_ms(); + if(remoteIntro.ExpiresSoon(now)) + { + MarkCurrentIntroBad(); + ShiftIntroduction(); + } routing::PathTransferMessage transfer(msg, remoteIntro.pathID); if(!path->SendRoutingMessage(&transfer, m_Endpoint->Router())) llarp::LogError("Failed to send frame on path");