Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix(iroh): always ping new paths
  • Loading branch information
Frando committed Jun 27, 2025
commit 087f003b5f486697fe0b3c3ca6bcd9cbd350f50e
7 changes: 4 additions & 3 deletions iroh/src/magicsock/node_map/node_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -789,12 +789,13 @@ impl NodeState {
self.prune_direct_addresses();
}

// if the endpoint does not yet have a best_addrr
// if the endpoint does not yet have a best_addr, or if this is a new path
let needs_ping_back = if matches!(path, SendAddr::Udp(_))
&& matches!(
&& (matches!(
self.udp_paths.best_addr.state(now),
best_addr::State::Empty | best_addr::State::Outdated(_)
) {
) || matches!(role, PingRole::NewPath))
{
// We also need to send a ping to make this path available to us as well. This
// is always sent together with a pong. So in the worst case the pong gets lost
// and this ping does not. In that case we ping-pong until both sides have
Expand Down
Loading