mirror of
https://github.com/tailscale/tailscale.git
synced 2026-12-06 08:32:21 -08:00
bindSocket's TS_DEBUG_ALWAYS_USE_DERP branch swapped in an empty socket group without closing the existing one. If the knob was turned on after the Conn was bound, a Rebind left the old socket open with no reference to it, so its port stayed bound even after Conn.Close. Close the current sockets first, as the normal bind path does. Fixes #22524 Signed-off-by: Dean Chen <[email protected]>