| Previous | Next |
| WSAENOTCONN | WSAETOOMANYREFS |
WSAESHUTDOWN
WSAESHUTDOWN means that the program tried to send or receive in a direction that was already disabled by shutdown.
Direction matters
After shutdown with SD_RECEIVE or SD_BOTH, receiving is no longer valid. After SD_SEND or SD_BOTH, sending is no longer valid. A half-close is therefore an intentional state transition, not a request to continue normal bidirectional I/O.
What to check
- Track shutdown direction in the connection object.
- Prevent queued send or receive work from running after the corresponding direction is closed.
- Close the socket once the protocol has completed its remaining half of the exchange.
Microsoft: shutdown · Microsoft: recv
Looking for a different code? Search another status or error code.
