From 8901123b34db21cdf13bc8ad7a554dac1a6f84f6 Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Wed, 19 Sep 2018 09:59:14 -0400 Subject: [PATCH] try better handover --- llarp/service/endpoint.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/llarp/service/endpoint.cpp b/llarp/service/endpoint.cpp index 5d76cc1a9..842f032cf 100644 --- a/llarp/service/endpoint.cpp +++ b/llarp/service/endpoint.cpp @@ -1228,6 +1228,7 @@ namespace llarp return ++(itr->second.seqno); } + /// send on an established convo tag void Endpoint::SendContext::EncryptAndSendTo(llarp_buffer_t payload, ProtocolType t) @@ -1246,6 +1247,14 @@ namespace llarp f.T = *tags.begin(); f.S = m_Endpoint->GetSeqNoForConvo(f.T); + auto now = llarp_time_now_ms(); + if(remoteIntro.ExpiresSoon(now)) + { + // shift intro + MarkCurrentIntroBad(); + ShiftIntroduction(); + } + auto path = m_PathSet->GetNewestPathByRouter(remoteIntro.router); if(!path) {