Merge pull request #16 from orignal/master

Merge pull request from orignal/master
This commit is contained in:
chertov 2014-03-19 06:46:07 +03:00
commit 1bad308878

View File

@ -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;
}