diff options
author | Igor Sysoev <igor@sysoev.ru> | 2004-04-28 06:14:50 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2004-04-28 06:14:50 +0000 |
commit | 4cec79fb6a3138aeeee400b9c32f23a22cf2dac8 (patch) | |
tree | 71ef80d2e71fdc81e756862eed80ae2c42288f53 /src/os/unix/ngx_readv_chain.c | |
parent | a30a028f14b18d7c12892d2fe79f457b4a67dd29 (diff) | |
download | nginx-4cec79fb6a3138aeeee400b9c32f23a22cf2dac8.tar.gz nginx-4cec79fb6a3138aeeee400b9c32f23a22cf2dac8.zip |
nginx-0.0.3-2004-04-28-10:14:50 import
Diffstat (limited to 'src/os/unix/ngx_readv_chain.c')
-rw-r--r-- | src/os/unix/ngx_readv_chain.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/os/unix/ngx_readv_chain.c b/src/os/unix/ngx_readv_chain.c index 49bb3ef3e..86f774a0d 100644 --- a/src/os/unix/ngx_readv_chain.c +++ b/src/os/unix/ngx_readv_chain.c @@ -173,13 +173,16 @@ ssize_t ngx_readv_chain(ngx_connection_t *c, ngx_chain_t *chain) do { n = readv(c->fd, (struct iovec *) io.elts, io.nelts); - if (n >= 0) { - if (n < size) { - rev->ready = 0; - } + if (n == 0) { + rev->ready = 0; + rev->eof = 1; - if (n == 0) { - rev->eof = 1; + return n; + + } else if (n > 0) { + + if (n < size && !(ngx_event_flags & NGX_HAVE_GREEDY_EVENT)) { + rev->ready = 0; } return n; |