From 3f3977283419fe81e09aa23b91e59de959a84abd Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Tue, 5 Jan 2010 21:09:02 -0800 Subject: [PATCH] libeio bugfix part 2 Reverts the change to deps/libeio/eio.c added in 04dd2d51be03c01d9ab259fe40e436730778bd01 It wasn't a bug, I was just using eio incorrectly. See http://lists.schmorp.de/pipermail/libev/2010q1/000855.html --- deps/libeio/eio.c | 3 --- src/node.cc | 4 +++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/deps/libeio/eio.c b/deps/libeio/eio.c index 9f536926558..7d54ca97c9e 100644 --- a/deps/libeio/eio.c +++ b/deps/libeio/eio.c @@ -548,9 +548,6 @@ static int etp_poll (void) } } - if (want_poll_cb) - want_poll_cb (); - errno = EAGAIN; return -1; } diff --git a/src/node.cc b/src/node.cc index 5c77e932efa..5599f5eee13 100644 --- a/src/node.cc +++ b/src/node.cc @@ -721,7 +721,9 @@ static void EIOCallback(EV_P_ ev_async *watcher, int revents) { assert(revents == EV_ASYNC); // Give control to EIO to process responses. In nearly every case // EIOPromise::After() (file.cc) is called once EIO receives the response. - eio_poll(); + if (-1 == eio_poll() && !ev_async_pending(&eio_watcher)) { + ev_async_send(EV_DEFAULT_UC_ &eio_watcher); + } } // EIOWantPoll() is called from the EIO thread pool each time an EIO