You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ic...@apache.org on 2017/07/30 18:54:15 UTC

svn commit: r1803454 - in /httpd/httpd/trunk/modules/http2: h2_bucket_beam.c h2_version.h

Author: icing
Date: Sun Jul 30 18:54:15 2017
New Revision: 1803454

URL: http://svn.apache.org/viewvc?rev=1803454&view=rev
Log:
mod_http2: signalling produce IO before waiting on beam buffer to drain.

Modified:
    httpd/httpd/trunk/modules/http2/h2_bucket_beam.c
    httpd/httpd/trunk/modules/http2/h2_version.h

Modified: httpd/httpd/trunk/modules/http2/h2_bucket_beam.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http2/h2_bucket_beam.c?rev=1803454&r1=1803453&r2=1803454&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/http2/h2_bucket_beam.c (original)
+++ httpd/httpd/trunk/modules/http2/h2_bucket_beam.c Sun Jul 30 18:54:15 2017
@@ -367,7 +367,7 @@ static apr_status_t wait_not_empty(h2_bu
 }
 
 static apr_status_t wait_not_full(h2_bucket_beam *beam, apr_read_type_e block, 
-                                  apr_size_t *pspace_left, apr_thread_mutex_t *lock)
+                                  apr_size_t *pspace_left, h2_beam_lock *bl)
 {
     apr_status_t rv = APR_SUCCESS;
     apr_size_t left;
@@ -376,14 +376,16 @@ static apr_status_t wait_not_full(h2_buc
         if (beam->aborted) {
             rv = APR_ECONNABORTED;
         }
-        else if (block != APR_BLOCK_READ) {
+        else if (block != APR_BLOCK_READ || !bl->mutex) {
             rv = APR_EAGAIN;
         }
-        else if (beam->timeout > 0) {
-            rv = apr_thread_cond_timedwait(beam->change, lock, beam->timeout);
-        }
         else {
-            rv = apr_thread_cond_wait(beam->change, lock);
+            if (beam->timeout > 0) {
+                rv = apr_thread_cond_timedwait(beam->change, bl->mutex, beam->timeout);
+            }
+            else {
+                rv = apr_thread_cond_wait(beam->change, bl->mutex);
+            }
         }
     }
     *pspace_left = left;
@@ -944,7 +946,8 @@ apr_status_t h2_beam_send(h2_bucket_beam
             space_left = calc_space_left(beam);
             while (!APR_BRIGADE_EMPTY(sender_bb) && APR_SUCCESS == rv) {
                 if (space_left <= 0) {
-                    rv = wait_not_full(beam, block, &space_left, bl.mutex);
+                    report_prod_io(beam, force_report, &bl);
+                    rv = wait_not_full(beam, block, &space_left, &bl);
                     if (APR_SUCCESS != rv) {
                         break;
                     }

Modified: httpd/httpd/trunk/modules/http2/h2_version.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http2/h2_version.h?rev=1803454&r1=1803453&r2=1803454&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/http2/h2_version.h (original)
+++ httpd/httpd/trunk/modules/http2/h2_version.h Sun Jul 30 18:54:15 2017
@@ -26,7 +26,7 @@
  * @macro
  * Version number of the http2 module as c string
  */
-#define MOD_HTTP2_VERSION "1.10.9-DEV"
+#define MOD_HTTP2_VERSION "1.10.10-DEV"
 
 /**
  * @macro
@@ -34,7 +34,7 @@
  * release. This is a 24 bit number with 8 bits for major number, 8 bits
  * for minor and 8 bits for patch. Version 1.2.3 becomes 0x010203.
  */
-#define MOD_HTTP2_VERSION_NUM 0x010a09
+#define MOD_HTTP2_VERSION_NUM 0x010a0a
 
 
 #endif /* mod_h2_h2_version_h */