Mercurial > hg > nginx
diff src/core/ngx_output_chain.c @ 3119:4c90c9129a82
fix case when the output filter should add incoming buffers
while waiting on file AIO completion
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Sun, 13 Sep 2009 06:28:17 +0000 |
parents | 5ea5a90000d5 |
children | cbb1add4a6fe |
line wrap: on
line diff
--- 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 } } +#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_cha #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; }