inbound sessions from CLIENTS should only have an elevated lifetime

This commit is contained in:
Jeff Becker 2021-07-01 08:42:46 -04:00
parent caddeef2e8
commit 20bc338eba
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05
1 changed files with 3 additions and 1 deletions

View File

@ -331,7 +331,9 @@ namespace llarp
if (m_State == State::Ready || m_State == State::LinkIntro)
{
return now > m_LastRX
&& now - m_LastRX > (m_Inbound ? DefaultLinkSessionLifetime : SessionAliveTimeout);
&& now - m_LastRX
> (m_Inbound and not m_RemoteRC.IsPublicRouter() ? DefaultLinkSessionLifetime
: SessionAliveTimeout);
}
return now - m_CreatedAt >= LinkLayerConnectTimeout;
}