mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-31 13:14:13 +00:00
don't set test failed state to expiring tunnels
This commit is contained in:
parent
3311fe62bb
commit
b9773c88e4
@ -351,7 +351,7 @@ namespace tunnel
|
|||||||
else
|
else
|
||||||
it.second.first->SetState (eTunnelStateTestFailed);
|
it.second.first->SetState (eTunnelStateTestFailed);
|
||||||
}
|
}
|
||||||
else
|
else if (it.second.first->GetState () != eTunnelStateExpiring)
|
||||||
it.second.first->SetState (eTunnelStateTestFailed);
|
it.second.first->SetState (eTunnelStateTestFailed);
|
||||||
}
|
}
|
||||||
if (it.second.second)
|
if (it.second.second)
|
||||||
@ -369,7 +369,7 @@ namespace tunnel
|
|||||||
if (m_LocalDestination)
|
if (m_LocalDestination)
|
||||||
m_LocalDestination->SetLeaseSetUpdated ();
|
m_LocalDestination->SetLeaseSetUpdated ();
|
||||||
}
|
}
|
||||||
else
|
else if (it.second.second->GetState () != eTunnelStateExpiring)
|
||||||
it.second.second->SetState (eTunnelStateTestFailed);
|
it.second.second->SetState (eTunnelStateTestFailed);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -381,7 +381,7 @@ namespace tunnel
|
|||||||
{
|
{
|
||||||
std::unique_lock<std::mutex> l(m_OutboundTunnelsMutex);
|
std::unique_lock<std::mutex> l(m_OutboundTunnelsMutex);
|
||||||
for (auto& it: m_OutboundTunnels)
|
for (auto& it: m_OutboundTunnels)
|
||||||
if (it->IsEstablished () || it->GetState () == eTunnelStateTestFailed)
|
if (it->IsEstablished ())
|
||||||
outboundTunnels.push_back (it);
|
outboundTunnels.push_back (it);
|
||||||
}
|
}
|
||||||
std::shuffle (outboundTunnels.begin(), outboundTunnels.end(), m_Rng);
|
std::shuffle (outboundTunnels.begin(), outboundTunnels.end(), m_Rng);
|
||||||
@ -389,7 +389,7 @@ namespace tunnel
|
|||||||
{
|
{
|
||||||
std::unique_lock<std::mutex> l(m_InboundTunnelsMutex);
|
std::unique_lock<std::mutex> l(m_InboundTunnelsMutex);
|
||||||
for (auto& it: m_InboundTunnels)
|
for (auto& it: m_InboundTunnels)
|
||||||
if (it->IsEstablished () || it->GetState () == eTunnelStateTestFailed)
|
if (it->IsEstablished ())
|
||||||
inboundTunnels.push_back (it);
|
inboundTunnels.push_back (it);
|
||||||
}
|
}
|
||||||
std::shuffle (inboundTunnels.begin(), inboundTunnels.end(), m_Rng);
|
std::shuffle (inboundTunnels.begin(), inboundTunnels.end(), m_Rng);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user