Fixed handling of the ready flag with kqueue.

There is nothing to do more when recv() has returned 0,
so we should drop the flag.
This commit is contained in:
Valentin Bartenev 2013-09-05 16:53:02 +04:00
parent d034e63a11
commit cf08ba72db
2 changed files with 2 additions and 0 deletions

View File

@ -129,6 +129,7 @@ ngx_readv_chain(ngx_connection_t *c, ngx_chain_t *chain)
"%d available bytes", rev->available);
#endif
rev->ready = 0;
rev->eof = 1;
rev->available = 0;
}

View File

@ -80,6 +80,7 @@ ngx_unix_recv(ngx_connection_t *c, u_char *buf, size_t size)
* even if kqueue reported about available data
*/
rev->ready = 0;
rev->eof = 1;
rev->available = 0;
}