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

Commit

Permalink
unix: remove overzealous assert
Browse files Browse the repository at this point in the history
Several node.js users are hitting this assert under what appear to be
mostly benign conditions. In other words, it's unclear whether it's
catching real bugs or just has wrong expectations.

An aborting process is rather disruptive so I'm removing the assert
from the stable branch and relanding it in the master branch.
  • Loading branch information
bnoordhuis committed Jun 7, 2013
1 parent f84becc commit 3ab3543
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions src/unix/stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -1318,16 +1318,6 @@ int uv_read2_start(uv_stream_t* stream, uv_alloc_cb alloc_cb,


int uv_read_stop(uv_stream_t* stream) {
/* Sanity check. We're going to stop the handle unless it's primed for
* writing but that means there should be some kind of write action in
* progress.
*/
assert(!uv__io_active(&stream->io_watcher, UV__POLLOUT) ||
!ngx_queue_empty(&stream->write_completed_queue) ||
!ngx_queue_empty(&stream->write_queue) ||
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))
Expand Down

0 comments on commit 3ab3543

Please sign in to comment.