# HG changeset patch # User Valentin Bartenev # Date 1373671470 -14400 # Node ID 13c006f0c40e196fa1fb4e14a8b2e3a8ec4478ba # Parent 8e7db77e5d88b20d113e77b574e676737d67bf0e Events: honor NGX_USE_GREEDY_EVENT when kqueue support is enabled. Currently this flag is needed for epoll and rtsig, and though these methods usually present on different platforms than kqueue, nginx can be compiled to support all of them. diff --git a/src/os/unix/ngx_readv_chain.c b/src/os/unix/ngx_readv_chain.c --- a/src/os/unix/ngx_readv_chain.c +++ b/src/os/unix/ngx_readv_chain.c @@ -136,7 +136,7 @@ ngx_readv_chain(ngx_connection_t *c, ngx return n; } - if (n < size) { + if (n < size && !(ngx_event_flags & NGX_USE_GREEDY_EVENT)) { rev->ready = 0; } diff --git a/src/os/unix/ngx_recv.c b/src/os/unix/ngx_recv.c --- a/src/os/unix/ngx_recv.c +++ b/src/os/unix/ngx_recv.c @@ -87,7 +87,9 @@ ngx_unix_recv(ngx_connection_t *c, u_cha return n; } - if ((size_t) n < size) { + if ((size_t) n < size + && !(ngx_event_flags & NGX_USE_GREEDY_EVENT)) + { rev->ready = 0; }