diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/core/ngx_output_chain.c | 12 | ||||
-rw-r--r-- | src/http/ngx_http_copy_filter_module.c | 1 |
2 files changed, 7 insertions, 6 deletions
diff --git a/src/core/ngx_output_chain.c b/src/core/ngx_output_chain.c index f51d69000..4f100a818 100644 --- a/src/core/ngx_output_chain.c +++ b/src/core/ngx_output_chain.c @@ -74,18 +74,18 @@ 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; for ( ;; ) { +#if (NGX_HAVE_FILE_AIO) + if (ctx->aio) { + return NGX_AGAIN; + } +#endif + while (ctx->in) { /* diff --git a/src/http/ngx_http_copy_filter_module.c b/src/http/ngx_http_copy_filter_module.c index d492f321d..2dd4a627b 100644 --- a/src/http/ngx_http_copy_filter_module.c +++ b/src/http/ngx_http_copy_filter_module.c @@ -211,6 +211,7 @@ ngx_http_copy_aio_handler(ngx_output_chain_ctx_t *ctx, ngx_file_t *file) r->main->blocked++; r->aio = 1; + ctx->aio = 1; } |