Skip to content

Commit fc031ea

Browse files
committed
fix(iroh): always ping new paths
1 parent 096e92d commit fc031ea

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

iroh/src/magicsock/node_map/node_state.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -791,10 +791,11 @@ impl NodeState {
791791

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

0 commit comments

Comments
 (0)