unix: make uv_shutdown() return UV_ENOTCONN
Return UV_ENOTCONN when the stream is not connected, not UV_EINVAL. Aligns with uv-win.
This commit is contained in:
parent
dea45940cd
commit
23b4e38d20
@ -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_STREAM_SHUT ||
|
||||||
stream->flags & UV_CLOSED ||
|
stream->flags & UV_CLOSED ||
|
||||||
stream->flags & UV_CLOSING) {
|
stream->flags & UV_CLOSING) {
|
||||||
uv__set_sys_error(stream->loop, EINVAL);
|
uv__set_artificial_error(stream->loop, UV_ENOTCONN);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user