]> git.kaiwu.me - nginx.git/commitdiff
Events: honor NGX_USE_GREEDY_EVENT when kqueue support is enabled.
authorValentin Bartenev <vbart@nginx.com>
Fri, 12 Jul 2013 23:24:30 +0000 (03:24 +0400)
committerValentin Bartenev <vbart@nginx.com>
Fri, 12 Jul 2013 23:24:30 +0000 (03:24 +0400)
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.

src/os/unix/ngx_readv_chain.c
src/os/unix/ngx_recv.c

index 7b6badfa8254bfde000e583f687033f4b51a483c..c2c21b4077f520cc2e00ef8092c883cdce37cbd3 100644 (file)
@@ -136,7 +136,7 @@ ngx_readv_chain(ngx_connection_t *c, ngx_chain_t *chain)
                 return n;
             }
 
-            if (n < size) {
+            if (n < size && !(ngx_event_flags & NGX_USE_GREEDY_EVENT)) {
                 rev->ready = 0;
             }
 
index 6a4a0996624ade93e7ece4e1389aad056c64f80f..1640cdb27219882d26bcf747602defd567cf36f8 100644 (file)
@@ -87,7 +87,9 @@ ngx_unix_recv(ngx_connection_t *c, u_char *buf, size_t size)
                 return n;
             }
 
-            if ((size_t) n < size) {
+            if ((size_t) n < size
+                && !(ngx_event_flags & NGX_USE_GREEDY_EVENT))
+            {
                 rev->ready = 0;
             }