changeset 5267:13c006f0c40e

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.
author Valentin Bartenev <vbart@nginx.com>
date Sat, 13 Jul 2013 03:24:30 +0400
parents 8e7db77e5d88
children e939f6e8548c
files src/os/unix/ngx_readv_chain.c src/os/unix/ngx_recv.c
diffstat 2 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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;
             }
 
--- 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;
             }