From 0e2814179c9903423d058b095e84f48fcfb8f3d1 Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Thu, 2 Nov 2017 16:46:50 -0400 Subject: [PATCH] unix: remove incorrect assertion in uv_shutdown() It isn't necessary, and doesn't agree with the printed message. PR-URL: https://github.com/libuv/libuv/pull/1620 Reviewed-By: Ben Noordhuis Reviewed-By: Colin Ihrig Reviewed-By: Santiago Gimeno --- src/unix/stream.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/unix/stream.c b/src/unix/stream.c index 672a7e2d..6fc0a01f 100644 --- a/src/unix/stream.c +++ b/src/unix/stream.c @@ -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 ||