Files
orca/config/scripts/test-runtime
NeilandJinwoo-H 409ce31fb4 fix(network): treat socket type-of-service failures as best effort (#42700)
undici's HTTP/1 writer calls socket.setTypeOfService before each write,
outside any fetch promise. On macOS the syscall fails with EINVAL once the
peer has reset the socket (VPN, Wi-Fi switch, proxy), so a network change
became an uncaught main-process exception and a modal error dialog. Treat
the TOS syscall as best effort, as Node already does on Windows; the write
then fails through undici's normal ECONNRESET path. Argument validation
errors still throw.

The test resets a real peer connection and calls setTypeOfService on the
reset socket, reproducing the native EINVAL on macOS.

Fixes #39579

Co-authored-by: Jinwoo-H <jinwoo0825@gmail.com>
2026-11-15 03:01:10 -08:00
..