diff --git a/ChangeLog b/ChangeLog index 0284ac78..17340f24 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +v1.10.10 +-------------------------------------------------------------------------------- + * adding signalling of data available before waiting on beam buffer to drain. Missing this causes suspended streams to stall and time out. + v1.10.9 -------------------------------------------------------------------------------- * cleanup of bucket beam change signaling to track down issue #143 diff --git a/configure.ac b/configure.ac index 3fc5ac8b..75408f60 100644 --- a/configure.ac +++ b/configure.ac @@ -14,7 +14,7 @@ # AC_PREREQ([2.69]) -AC_INIT([mod_http2], [1.10.9], [stefan.eissing@greenbytes.de]) +AC_INIT([mod_http2], [1.10.10], [stefan.eissing@greenbytes.de]) LT_PREREQ([2.2.6]) LT_INIT() diff --git a/mod_http2/h2_bucket_beam.c b/mod_http2/h2_bucket_beam.c index fc2b7230..9f3bc709 100644 --- a/mod_http2/h2_bucket_beam.c +++ b/mod_http2/h2_bucket_beam.c @@ -367,7 +367,7 @@ static apr_status_t wait_not_empty(h2_bucket_beam *beam, apr_read_type_e block, } 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_bucket_beam *beam, apr_read_type_e block, 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 *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; } diff --git a/mod_http2/h2_version.h b/mod_http2/h2_version.h index aa10a2a5..94608ac4 100644 --- a/mod_http2/h2_version.h +++ b/mod_http2/h2_version.h @@ -26,7 +26,7 @@ * @macro * Version number of the http2 module as c string */ -#define MOD_HTTP2_VERSION "1.10.9-git" +#define MOD_HTTP2_VERSION "1.10.10-git" /** * @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 */