]> git.kaiwu.me - nginx.git/commitdiff
Fixed AIO handling in the output chain.
authorValentin Bartenev <vbart@nginx.com>
Wed, 28 Jan 2015 18:33:06 +0000 (21:33 +0300)
committerValentin Bartenev <vbart@nginx.com>
Wed, 28 Jan 2015 18:33:06 +0000 (21:33 +0300)
The ctx->aio flag must be taken into account in the short path too.

src/core/ngx_output_chain.c

index 3cb60ea73ddbc91cdd546fae8cdd345830287266..9d7a8460f9be973ab41d99f9fa17b7a03e4d66eb 100644 (file)
@@ -45,8 +45,12 @@ ngx_output_chain(ngx_output_chain_ctx_t *ctx, ngx_chain_t *in)
     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