When a Windows server sends UDP to a client that has already left, a “port unreachable” (ICMP) message comes back. That message makes the next receive call fail with an error, and if the server code treats the error as a failure of the socket itself, everyone using that socket is affected.
Why UDP keeps going to the address of a client that just left, and a “port unreachable” (ICMP) message comes back → Effect Windows fails the next receive call with WSAECONNRESET (10054), and the server code stops receiving or closes the socket → On screen Everyone who was using that socket freezes or disconnects at once
Turn off SIO_UDP_CONNRESET with WSAIoctl so these messages aren’t reported, just log receive errors and keep receiving.
On the graph
Mass disconnect · Connection count, receive error log
Where to look
UDP receive error codes (WSAECONNRESET, 10054) in the game server log and records of the receive loop stopping or the socket being closed; in a server-side packet capture, whether an ICMP Port Unreachable arrived just before
Confirmed if
A WSAECONNRESET receive error is logged right before connections drop all at once, and before that an ICMP Port Unreachable arrives from the address of a client that just left
Ruled out if
Linux server, or code that turns off SIO_UDP_CONNRESET: not applicable
Check with
Game server or client logs and metrics
Sources
Winsock IOCTLsMicrosoft SIO_UDP_CONNRESET turns reporting of UDP “port unreachable” (PORT_UNREACHABLE) messages on and off
recvfrom function (winsock.h)Microsoft WSAECONNRESET on a UDP socket means a previous send got an ICMP Port Unreachable back