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.
This commit is contained in:
Valentin Bartenev 2013-07-13 03:24:30 +04:00
parent 3162bdc3ef
commit 3b6d3efb39
2 changed files with 4 additions and 2 deletions

View 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;
}

View 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;
}