| Previous | Next |
| EXFULL | EBADRQC |
ECONNRESET
A reset terminated the connection state
ECONNRESET indicates that the connection was reset rather than closed through the normal half-close and FIN sequence. In TCP, reset processing discards connection state and outstanding queued operations receive reset outcomes; it is therefore materially different from receiving an orderly end of stream.
The name “by peer” in a platform error description should not be simplified to “the remote application intentionally closed it.” A reset can be produced by protocol state, a remote stack, an intermediary, or an error path. The application needs packet, endpoint, and timing evidence before assigning blame.
What distinguishes it in logs
- Record whether the error appeared on read, write, or a pending connect; the same reset has different application consequences at each point.
- Capture the connection's four-tuple, protocol state, bytes acknowledged at the application layer, and any peer or proxy logs available for the same interval.
- Do not confuse a zero-length stream read after FIN with a reset. A graceful close and a reset require different retry and replay decisions.
Safe recovery question
Before reconnecting, establish whether the application operation was acknowledged. TCP reset semantics do not tell an application whether a request was processed before the transport failed.
References
Looking for a different code? Search another status or error code.