File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
iroh/src/magicsock/node_map Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -789,12 +789,13 @@ impl NodeState {
789789 self . prune_direct_addresses ( ) ;
790790 }
791791
792- // if the endpoint does not yet have a best_addrr
792+ // if the endpoint does not yet have a best_addr, or if this is a new path
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
You can’t perform that action at this time.
0 commit comments