mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 13:27:17 +01:00
update leaseset in destination's thread
This commit is contained in:
parent
bc9d25ec3b
commit
890fe77b10
|
@ -141,7 +141,7 @@ namespace tunnel
|
||||||
m_InboundTunnels.insert (createdTunnel);
|
m_InboundTunnels.insert (createdTunnel);
|
||||||
}
|
}
|
||||||
if (m_LocalDestination)
|
if (m_LocalDestination)
|
||||||
m_LocalDestination->SetLeaseSetUpdated ();
|
m_LocalDestination->SetLeaseSetUpdated (true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TunnelPool::TunnelExpired (std::shared_ptr<InboundTunnel> expiredTunnel)
|
void TunnelPool::TunnelExpired (std::shared_ptr<InboundTunnel> expiredTunnel)
|
||||||
|
@ -330,7 +330,7 @@ namespace tunnel
|
||||||
}
|
}
|
||||||
|
|
||||||
if (num < m_NumInboundTunnels && m_NumInboundHops <= 0 && m_LocalDestination) // zero hops IB
|
if (num < m_NumInboundTunnels && m_NumInboundHops <= 0 && m_LocalDestination) // zero hops IB
|
||||||
m_LocalDestination->SetLeaseSetUpdated (); // update LeaseSet immediately
|
m_LocalDestination->SetLeaseSetUpdated (true); // update LeaseSet immediately
|
||||||
}
|
}
|
||||||
|
|
||||||
void TunnelPool::TestTunnels ()
|
void TunnelPool::TestTunnels ()
|
||||||
|
@ -377,10 +377,10 @@ namespace tunnel
|
||||||
it.second.second->SetState (eTunnelStateTestFailed);
|
it.second.second->SetState (eTunnelStateTestFailed);
|
||||||
}
|
}
|
||||||
if (failed && m_LocalDestination)
|
if (failed && m_LocalDestination)
|
||||||
m_LocalDestination->SetLeaseSetUpdated ();
|
m_LocalDestination->SetLeaseSetUpdated (true);
|
||||||
}
|
}
|
||||||
if (m_LocalDestination)
|
if (m_LocalDestination)
|
||||||
m_LocalDestination->SetLeaseSetUpdated ();
|
m_LocalDestination->SetLeaseSetUpdated (true);
|
||||||
}
|
}
|
||||||
else if (it.second.second->GetState () != eTunnelStateExpiring)
|
else if (it.second.second->GetState () != eTunnelStateExpiring)
|
||||||
it.second.second->SetState (eTunnelStateTestFailed);
|
it.second.second->SetState (eTunnelStateTestFailed);
|
||||||
|
|
Loading…
Reference in a new issue