changeset 5966:bcdfc39bf44d

Fixed AIO handling in the output chain. The ctx->aio flag must be taken into account in the short path too.
author Valentin Bartenev <vbart@nginx.com>
date Wed, 28 Jan 2015 21:33:06 +0300
parents 78271500b8de
children 863d9de1e62b
files src/core/ngx_output_chain.c
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/core/ngx_output_chain.c
+++ b/src/core/ngx_output_chain.c
@@ -45,8 +45,12 @@ ngx_output_chain(ngx_output_chain_ctx_t 
     ngx_int_t     rc, last;
     ngx_chain_t  *cl, *out, **last_out;
 
-    if (ctx->in == NULL && ctx->busy == NULL) {
-
+    if (ctx->in == NULL && ctx->busy == NULL
+#if (NGX_HAVE_FILE_AIO)
+        && !ctx->aio
+#endif
+       )
+    {
         /*
          * the short path for the case when the ctx->in and ctx->busy chains
          * are empty, the incoming chain is empty too or has the single buf