update LeaseSet if inbond tunnel failed

This commit is contained in:
orignal 2024-05-17 17:35:16 -04:00
parent b5994e058a
commit 940628bf36

View File

@ -367,7 +367,11 @@ namespace tunnel
{ {
std::unique_lock<std::mutex> l(m_InboundTunnelsMutex); std::unique_lock<std::mutex> l(m_InboundTunnelsMutex);
if (m_InboundTunnels.size () > 1 || m_NumInboundTunnels <= 1) // don't fail last tunnel if (m_InboundTunnels.size () > 1 || m_NumInboundTunnels <= 1) // don't fail last tunnel
{
m_InboundTunnels.erase (it.second.second); m_InboundTunnels.erase (it.second.second);
if (m_LocalDestination)
m_LocalDestination->SetLeaseSetUpdated ();
}
else else
it.second.second->SetState (eTunnelStateTestFailed); it.second.second->SetState (eTunnelStateTestFailed);
} }