Skip to content

Commit

Permalink
unix: remove incorrect assertion in uv_shutdown()
Browse files Browse the repository at this point in the history
It isn't necessary, and doesn't agree with the printed message.

PR-URL: #1620
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
  • Loading branch information
vtjnash authored and cjihrig committed Dec 1, 2017
1 parent d708df1 commit 0e28141
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/unix/stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -1261,8 +1261,9 @@ static void uv__read(uv_stream_t* stream) {


int uv_shutdown(uv_shutdown_t* req, uv_stream_t* stream, uv_shutdown_cb cb) {
assert((stream->type == UV_TCP || stream->type == UV_NAMED_PIPE) &&
"uv_shutdown (unix) only supports uv_handle_t right now");
assert(stream->type == UV_TCP ||
stream->type == UV_TTY ||
stream->type == UV_NAMED_PIPE);

if (!(stream->flags & UV_STREAM_WRITABLE) ||
stream->flags & UV_STREAM_SHUT ||
Expand Down

0 comments on commit 0e28141

Please sign in to comment.