diff options
author | Igor Sysoev <igor@sysoev.ru> | 2009-09-13 06:28:17 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2009-09-13 06:28:17 +0000 |
commit | 84b20ca18b07c4f27d3ae7a9b3660b184b051057 (patch) | |
tree | 8b29e9396c7380db28431d4ea5708ea06257d986 /src/core/ngx_output_chain.c | |
parent | 570608ff4a0863591d4db63cd0acb13eab5a3af8 (diff) | |
download | nginx-84b20ca18b07c4f27d3ae7a9b3660b184b051057.tar.gz nginx-84b20ca18b07c4f27d3ae7a9b3660b184b051057.zip |
fix case when the output filter should add incoming buffers
while waiting on file AIO completion
Diffstat (limited to 'src/core/ngx_output_chain.c')
-rw-r--r-- | src/core/ngx_output_chain.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/core/ngx_output_chain.c b/src/core/ngx_output_chain.c index 0e3925812..01f42a191 100644 --- a/src/core/ngx_output_chain.c +++ b/src/core/ngx_output_chain.c @@ -74,6 +74,12 @@ ngx_output_chain(ngx_output_chain_ctx_t *ctx, ngx_chain_t *in) } } +#if (NGX_HAVE_FILE_AIO) + if (ctx->aio) { + return NGX_AGAIN; + } +#endif + out = NULL; last_out = &out; last = NGX_NONE; @@ -519,11 +525,11 @@ ngx_output_chain_copy_buf(ngx_output_chain_ctx_t *ctx) #if (NGX_HAVE_FILE_AIO) - if (ctx->aio) { + if (ctx->aio_handler) { n = ngx_file_aio_read(src->file, dst->pos, (size_t) size, src->file_pos, ctx->pool); if (n == NGX_AGAIN) { - ctx->aio(ctx, src->file); + ctx->aio_handler(ctx, src->file); return NGX_AGAIN; } |