What does Windows error code 10052 (WSAENETRESET) mean?

 
Previous Next
WSAENETUNREACH WSAECONNABORTED

WSAENETRESET

WSAENETRESET reports that an established connection was broken after keep-alive activity or local network processing detected a failure while an operation was underway. It is different from a connection refusal: this socket had already reached the connected state.

What the application should infer

The peer may have disappeared, a middlebox may have discarded idle state, or the network path may have failed. A write that reports this error has not delivered a reliable application-level outcome, so blindly replaying a request can duplicate side effects. The socket should be treated as unusable; Windows guidance for a broken connected socket is to discard it and create a new one rather than trying to return the old object to a known-good state.

Practical follow-up

  • Record idle time, keep-alive settings, last successful read/write, proxy and load-balancer path, and whether the request is safe to retry.
  • Re-establish a new connection only after the protocol decides whether a retry is idempotent.
  • Compare with WSAECONNRESET and WSAETIMEDOUT; they describe different observations of a lost connection.

Microsoft: sendto errors · Microsoft: connected-socket handling · IETF: TCP keep-alive guidance


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