change datagram routing path if nothing comes back in 10 seconds

This commit is contained in:
orignal 2020-07-15 16:20:35 -04:00
parent 67b94d3533
commit c41554109b
4 changed files with 85 additions and 70 deletions

View file

@ -315,6 +315,13 @@ namespace datagram
}
auto path = m_RoutingSession->GetSharedRoutingPath();
if (path && m_RoutingSession->IsRatchets () &&
m_LastUse > m_RoutingSession->GetLastActivityTimestamp ()*1000 + DATAGRAM_SESSION_PATH_TIMEOUT)
{
m_RoutingSession->SetSharedRoutingPath (nullptr);
path = nullptr;
}
if (path)
{
if (path->outboundTunnel && !path->outboundTunnel->IsEstablished ())