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:
parent
3162bdc3ef
commit
3b6d3efb39
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue