Files
Alex Valiushko 1b0d4478e6 wgengine/magicsock: handle UDP read errors instead of dying
Make magicsock continue, with a backoff, on any read error except
net.ErrClosed. Add a recv err metric, and make receive func explicitly
mark itself unhealthy since we can't rely on the number of calls.
Cleared by a successful read, or opening a new generation of receive
funcs.

A raw EBADF or ENOTSOCK on a read mean an external closer destroyed
the socket, and rebind is attempted. On Windows the Winsock numbers are
matched instead, following neterror.IsClosedPipeError.

Updates #22097

Signed-off-by: Alex Valiushko <[email protected]>
Change-Id: Ib964129e26c6f865edcd6cc7d52b10176a6a6964
2026-10-30 22:08:31 +00:00
..