mirror of
https://github.com/rustdesk/hbb_common.git
synced 2026-10-20 07:34:35 +00:00
7a5ad5252e6aa4933d28b714c9d224079ab3bcfd
`new_direct_udp_for` is back on `test_target`. The punch reply the controlled side sends with it goes to the address it picks, and that reply lost is a device online and unreachable - so it keeps the handshake that proves the address, as the registration does. The controller's NAT test, once per connection, is what could not afford the proof, a round trip right before the connection it then opens to the same host; it alone takes the resolver's preferred address, as `new_direct_udp_for_unverified`, and a wrong one there costs that connection its UDP punch and nothing more. That lookup is the first on the controller's connection path and the one not under CONNECT_TIMEOUT, so it gets a second: a resolver that hangs would otherwise hold the connection for its whole retry schedule before `connect_tcp` even starts, and what a slower lookup loses is, again, only the NAT test. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019aokqJuhjvB3kijXtAg5Ns
Description
No description provided
75 MiB
Languages
Rust
100%