file AIO read may be posted inside loop
diff --git a/src/core/ngx_output_chain.c b/src/core/ngx_output_chain.c index f51d690..4f100a8 100644 --- a/src/core/ngx_output_chain.c +++ b/src/core/ngx_output_chain.c
@@ -74,18 +74,18 @@ } } -#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 d492f32..2dd4a62 100644 --- a/src/http/ngx_http_copy_filter_module.c +++ b/src/http/ngx_http_copy_filter_module.c
@@ -211,6 +211,7 @@ r->main->blocked++; r->aio = 1; + ctx->aio = 1; }