What does Windows error code 10054 (WSAECONNRESET) mean?

 
Previous Next
WSAECONNABORTED WSAENOBUFS

WSAECONNRESET

WSAECONNRESET means that a connection was reset rather than closed gracefully. For a stream socket, the remote side performed a hard or abortive close, so the socket should be discarded.

TCP and UDP are different

For TCP, this usually means that the peer or an intermediary terminated the stream abruptly. For a UDP socket, Winsock can report the code after an earlier datagram caused an ICMP Port Unreachable response.

What to record

  • Whether the socket is stream or datagram based.
  • The final request or application message sent before the reset.
  • Whether the receive side observed a graceful end of stream: a graceful TCP close produces a successful receive of zero bytes, not this error.

Microsoft: recv · Microsoft: connect


Looking for a different code? Search another status or error code.