| Previous | Next |
| ENOTCONN | ETOOMANYREFS |
ESHUTDOWN
ESHUTDOWN indicates that a send was attempted after the transport endpoint had been shut down for transmission. Linux documents shutdown(fd, SHUT_WR) and shutdown(fd, SHUT_RDWR) as operations that disallow further sends. The error should therefore be treated as a socket-state failure: this endpoint cannot carry the requested outbound data in its current lifetime.
The errno does not by itself prove who initiated the transition or whether a peer already processed earlier application data. Keep it distinct from ECONNRESET, which reports a reset by the peer, and from EPIPE, which send-style calls can use when a connection is no longer writable. Correct recovery usually creates or obtains a fresh connection; it should not simply clear a local “connected” flag and reuse the shutdown endpoint.
State to preserve in logs
- Every local call to
shutdown()orclose(), including its direction and owning component. - The ordering of write tasks, cancellation, destructor activity, and completion callbacks around the failed send.
- Whether the application protocol has an acknowledgement or idempotency rule before a queued message is retried on a replacement connection.
- The socket type and transport, because shutdown and error reporting semantics differ across protocols and platforms.
Linux shutdown(2) · Linux errno(3) · Linux UAPI errno definitions
Looking for a different code? Search another status or error code.