mirror of
https://github.com/tailscale/tailscale.git
synced 2026-11-09 02:53:09 -05:00
This iterates on the work in #21902, #22100 and tailscale/wireguard-go#116. wireguard-go no longer has a deathSpiral loop; it relies on the Bind's ReceiveFunc to pace read retries. This is the magicsock side of that change. On read errors other than truncation and UDP read feedback, the receive func now sleeps 100ms and retries rather than returning. If reads keep failing for 30s it marks itself broken via ReceiveFuncStats.SetBroken. The next successful read clears that state. Updates #22097 Change-Id: I9f1134242c3cb5ac2ef3c282cf7bcd7606cb5b9e Signed-off-by: Nick Beirne <nickb@tailscale.com>