]> granicus.if.org Git - apache/commitdiff
On the trunk:
authorStefan Eissing <icing@apache.org>
Wed, 29 Mar 2017 06:31:46 +0000 (06:31 +0000)
committerStefan Eissing <icing@apache.org>
Wed, 29 Mar 2017 06:31:46 +0000 (06:31 +0000)
mod_http2 after review by Christophe:
  * fix h2_fifo_peek to properly block
  * check peek return status while processing mplx queue

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1789276 13f79535-47bb-0310-9956-ffa450edef68

modules/http2/h2_util.c
modules/http2/h2_workers.c

index 4f4616e5c5d6443990dbcae27ede54a82c511c5c..0389193e88f9752fe9c773d838113e90f50efffc 100644 (file)
@@ -846,7 +846,7 @@ static apr_status_t fifo_peek(h2_fifo *fifo, h2_fifo_peek_fn *fn, void *ctx, int
 
 apr_status_t h2_fifo_peek(h2_fifo *fifo, h2_fifo_peek_fn *fn, void *ctx)
 {
-    return fifo_peek(fifo, fn, ctx, 0);
+    return fifo_peek(fifo, fn, ctx, 1);
 }
 
 apr_status_t h2_fifo_try_peek(h2_fifo *fifo, h2_fifo_peek_fn *fn, void *ctx)
index 02e7d76336176477cd10900b8a5cde78a656dc35..131993495983dd4e8f728ec54ff65327fbfea3b7 100644 (file)
@@ -134,6 +134,9 @@ static apr_status_t get_next(h2_slot *slot)
     while (!slot->aborted) {
         if (!slot->task) {
             status = h2_fifo_try_peek(workers->mplxs, mplx_peek, slot);
+            if (status == APR_EOF) {
+                return status;
+            }
         }
         
         if (slot->task) {