don't compare OBEP hash twice to check if it's a fresh tunnel

This commit is contained in:
orignal 2024-04-08 19:00:02 -04:00
parent 04bccedd9b
commit 9a30068ae5
3 changed files with 9 additions and 7 deletions

View file

@ -927,9 +927,7 @@ namespace stream
else if (!m_CurrentOutboundTunnel->IsEstablished ())
{
auto oldOutboundTunnel = m_CurrentOutboundTunnel;
m_CurrentOutboundTunnel = m_LocalDestination.GetOwner ()->GetTunnelPool ()->GetNewOutboundTunnel (m_CurrentOutboundTunnel);
if (m_CurrentOutboundTunnel && oldOutboundTunnel->GetEndpointIdentHash() != m_CurrentOutboundTunnel->GetEndpointIdentHash())
freshTunnel = true;
std::tie(m_CurrentOutboundTunnel, freshTunnel) = m_LocalDestination.GetOwner ()->GetTunnelPool ()->GetNewOutboundTunnel (m_CurrentOutboundTunnel);
}
if (!m_CurrentOutboundTunnel)
{