diff --git a/llarp/path/path.cpp b/llarp/path/path.cpp index c870cfa20..1cbd056e5 100644 --- a/llarp/path/path.cpp +++ b/llarp/path/path.cpp @@ -499,6 +499,9 @@ namespace llarp } } + /// how long we wait for a path to become active again after it times out + constexpr auto PathReanimationTimeout = 45s; + bool Path::Expired(llarp_time_t now) const { @@ -506,7 +509,11 @@ namespace llarp return true; if (_status == ePathBuilding) return false; - if (_status == ePathEstablished || _status == ePathTimeout) + if (_status == ePathTimeout) + { + return now >= m_LastRecvMessage + PathReanimationTimeout; + } + if (_status == ePathEstablished) { return now >= ExpireTime(); }