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

Commit

Permalink
unix: fix small write immediately followed by uv_read_stop never comp…
Browse files Browse the repository at this point in the history
…letes

uv__io_feed() would not update the pending events masked to include
UV__POLLOUT, so a subsequent uv__io_stop() call to remove the
UV__POLLIN event would cause the pevents mask to become zero. When
the pevents mask would be zeroed, the io watcher would be removed from
the pending queue.
  • Loading branch information
piscisaureus committed Dec 12, 2012
1 parent 731adac commit bf6f302
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/unix/core.c
Expand Up @@ -661,6 +661,7 @@ void uv__io_stop(uv_loop_t* loop, uv__io_t* w, unsigned int events) {


void uv__io_feed(uv_loop_t* loop, uv__io_t* w) {
w->pevents |= UV__POLLOUT;
if (ngx_queue_empty(&w->pending_queue))
ngx_queue_insert_tail(&loop->pending_queue, &w->pending_queue);
}
Expand Down

0 comments on commit bf6f302

Please sign in to comment.