Skip to content

Commit

Permalink
update leaseset in destination's thread
Browse files Browse the repository at this point in the history
  • Loading branch information
orignal committed Oct 17, 2024
1 parent bc9d25e commit 890fe77
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions libi2pd/TunnelPool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ namespace tunnel
m_InboundTunnels.insert (createdTunnel);
}
if (m_LocalDestination)
m_LocalDestination->SetLeaseSetUpdated ();
m_LocalDestination->SetLeaseSetUpdated (true);
}

void TunnelPool::TunnelExpired (std::shared_ptr<InboundTunnel> expiredTunnel)
Expand Down Expand Up @@ -330,7 +330,7 @@ namespace tunnel
}

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 ()
Expand Down Expand Up @@ -377,10 +377,10 @@ namespace tunnel
it.second.second->SetState (eTunnelStateTestFailed);
}
if (failed && m_LocalDestination)
m_LocalDestination->SetLeaseSetUpdated ();
m_LocalDestination->SetLeaseSetUpdated (true);
}
if (m_LocalDestination)
m_LocalDestination->SetLeaseSetUpdated ();
m_LocalDestination->SetLeaseSetUpdated (true);
}
else if (it.second.second->GetState () != eTunnelStateExpiring)
it.second.second->SetState (eTunnelStateTestFailed);
Expand Down

0 comments on commit 890fe77

Please sign in to comment.