mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 13:27:17 +01:00
exclude failed tunnel from pool
This commit is contained in:
parent
b34629b9c0
commit
d938332db2
|
@ -37,7 +37,11 @@ namespace tunnel
|
|||
|
||||
void TunnelPool::TunnelExpired (InboundTunnel * expiredTunnel)
|
||||
{
|
||||
m_InboundTunnels.erase (expiredTunnel);
|
||||
if (expiredTunnel)
|
||||
{
|
||||
expiredTunnel->SetTunnelPool (nullptr);
|
||||
m_InboundTunnels.erase (expiredTunnel);
|
||||
}
|
||||
if (m_LocalDestination)
|
||||
m_LocalDestination->UpdateLeaseSet ();
|
||||
}
|
||||
|
@ -49,7 +53,11 @@ namespace tunnel
|
|||
|
||||
void TunnelPool::TunnelExpired (OutboundTunnel * expiredTunnel)
|
||||
{
|
||||
m_OutboundTunnels.erase (expiredTunnel);
|
||||
if (expiredTunnel)
|
||||
{
|
||||
expiredTunnel->SetTunnelPool (nullptr);
|
||||
m_OutboundTunnels.erase (expiredTunnel);
|
||||
}
|
||||
if (expiredTunnel == m_LastOutboundTunnel)
|
||||
m_LastOutboundTunnel = nullptr;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue