mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 08:14:15 +00:00
delete expired transit tunnels
This commit is contained in:
parent
46d2b38760
commit
0d8b3910ef
@ -399,6 +399,7 @@ namespace tunnel
|
|||||||
if (pool)
|
if (pool)
|
||||||
pool->TunnelExpired (*it);
|
pool->TunnelExpired (*it);
|
||||||
it = m_OutboundTunnels.erase (it);
|
it = m_OutboundTunnels.erase (it);
|
||||||
|
// TODO: delete tunnel, but make nobody uses it
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
it++;
|
it++;
|
||||||
@ -431,6 +432,7 @@ namespace tunnel
|
|||||||
if (pool)
|
if (pool)
|
||||||
pool->TunnelExpired (it->second);
|
pool->TunnelExpired (it->second);
|
||||||
it = m_InboundTunnels.erase (it);
|
it = m_InboundTunnels.erase (it);
|
||||||
|
// TODO: delete tunnel, but make nobody uses it
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
it++;
|
it++;
|
||||||
@ -465,7 +467,9 @@ namespace tunnel
|
|||||||
if (ts > it->second->GetCreationTime () + TUNNEL_EXPIRATION_TIMEOUT)
|
if (ts > it->second->GetCreationTime () + TUNNEL_EXPIRATION_TIMEOUT)
|
||||||
{
|
{
|
||||||
LogPrint ("Transit tunnel ", it->second->GetTunnelID (), " expired");
|
LogPrint ("Transit tunnel ", it->second->GetTunnelID (), " expired");
|
||||||
|
auto tmp = it->second;
|
||||||
it = m_TransitTunnels.erase (it);
|
it = m_TransitTunnels.erase (it);
|
||||||
|
delete tmp;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
it++;
|
it++;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user