Skip to content

Commit

Permalink
v1.10.10: fixing stream response getting stuck when writing >32k on a…
Browse files Browse the repository at this point in the history
… suspended stream.
  • Loading branch information
Stefan Eissing committed Jul 30, 2017
1 parent 6228c09 commit 43f3d10
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 10 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#

AC_PREREQ([2.69])
AC_INIT([mod_http2], [1.10.9], [[email protected]])
AC_INIT([mod_http2], [1.10.10], [[email protected]])

LT_PREREQ([2.2.6])
LT_INIT()
Expand Down
17 changes: 10 additions & 7 deletions mod_http2/h2_bucket_beam.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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;
}
Expand Down
4 changes: 2 additions & 2 deletions mod_http2/h2_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@
* @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
* Numerical representation of the version number of the http2 module
* 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 */

0 comments on commit 43f3d10

Please sign in to comment.