mirror of
https://github.com/oven-sh/bun
synced 2026-02-10 02:48:50 +00:00
On Windows, when a UDP socket sends a packet to an unreachable port, the Windows TCP/IP stack receives an ICMP "Port Unreachable" message and by default forwards this as WSAECONNRESET (error code 10054) to subsequent recv calls. This caused Bun's UDP socket to close completely. This fix disables the behavior using SIO_UDP_CONNRESET, matching Node.js/libuv behavior. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>