Skip to content

Commit

Permalink
delete expired transit tunnels
Browse files Browse the repository at this point in the history
  • Loading branch information
orignal committed Jul 3, 2014
1 parent 46d2b38 commit 0d8b391
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Tunnel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,7 @@ namespace tunnel
if (pool)
pool->TunnelExpired (*it);
it = m_OutboundTunnels.erase (it);
// TODO: delete tunnel, but make nobody uses it
}
else
it++;
Expand Down Expand Up @@ -431,6 +432,7 @@ namespace tunnel
if (pool)
pool->TunnelExpired (it->second);
it = m_InboundTunnels.erase (it);
// TODO: delete tunnel, but make nobody uses it
}
else
it++;
Expand Down Expand Up @@ -465,7 +467,9 @@ namespace tunnel
if (ts > it->second->GetCreationTime () + TUNNEL_EXPIRATION_TIMEOUT)
{
LogPrint ("Transit tunnel ", it->second->GetTunnelID (), " expired");
auto tmp = it->second;
it = m_TransitTunnels.erase (it);
delete tmp;
}
else
it++;
Expand Down

0 comments on commit 0d8b391

Please sign in to comment.