From fe7b154476145ebc69ab70d3ca1d195116a00065 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Fri, 24 May 2013 21:23:09 +0200 Subject: [PATCH] Revert "unix: fix stream refcounting buglet" This change is making 45 out of 527 node.js tests fail on OS X with the following assertion: Assertion failed: (!uv__is_active(handle)), function uv__finish_close, file ../../deps/uv/src/unix/core.c, line 165. It's likely a manifestation of a bug elsewhere but, because there's a new node.js release going out tonight, I'm reverting it for now. This reverts commit 80f2f826bf90b84e659321c0b7fd8af419acb85e. Conflicts: src/unix/stream.c --- src/unix/stream.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/unix/stream.c b/src/unix/stream.c index ac74537e..aeefa2c4 100644 --- a/src/unix/stream.c +++ b/src/unix/stream.c @@ -1318,10 +1318,9 @@ int uv_read_stop(uv_stream_t* stream) { stream->shutdown_req != NULL || stream->connect_req != NULL); - stream->flags &= ~UV_STREAM_READING; uv__io_stop(stream->loop, &stream->io_watcher, UV__POLLIN); - if (!uv__io_active(&stream->io_watcher, UV__POLLOUT)) - uv__handle_stop(stream); + uv__handle_stop(stream); + stream->flags &= ~UV_STREAM_READING; #if defined(__APPLE__) /* Notify select() thread about state change */