Skip to content
This repository has been archived by the owner on May 4, 2018. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
unix: make uv_shutdown() return UV_ENOTCONN
Return UV_ENOTCONN when the stream is not connected, not UV_EINVAL. Aligns
with uv-win.
  • Loading branch information
bnoordhuis committed Jun 8, 2012
1 parent dea4594 commit 23b4e38
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/unix/stream.c
Expand Up @@ -708,7 +708,7 @@ int uv_shutdown(uv_shutdown_t* req, uv_stream_t* stream, uv_shutdown_cb cb) {
stream->flags & UV_STREAM_SHUT ||
stream->flags & UV_CLOSED ||
stream->flags & UV_CLOSING) {
uv__set_sys_error(stream->loop, EINVAL);
uv__set_artificial_error(stream->loop, UV_ENOTCONN);
return -1;
}

Expand Down

0 comments on commit 23b4e38

Please sign in to comment.