summaryrefslogtreecommitdiffstats
path: root/modules/http2/h2_mplx.c
diff options
context:
space:
mode:
authorStefan Eissing <icing@apache.org>2019-02-26 10:55:44 +0100
committerStefan Eissing <icing@apache.org>2019-02-26 10:55:44 +0100
commit4ac456c6568521d1287d58f785f6a514e8528194 (patch)
treedc53133117d220c1ae92b086d3fd47a7a56a3734 /modules/http2/h2_mplx.c
parentfr doc rebuild. (diff)
downloadapache2-4ac456c6568521d1287d58f785f6a514e8528194.tar.xz
apache2-4ac456c6568521d1287d58f785f6a514e8528194.zip
*) mod_http2/mod_proxy_http2: proxy_http2 checks correct master connection aborted status
to trigger immediate shutdown of backend connections. This is now always signalled by mod_http2 when the the session is being released. proxy_http2 now only sends a PING frame to the backend when there is not already one in flight. [Stefan Eissing] *) mod_proxy_http2: fixed an issue where a proxy_http2 handler entered an infinite loop when encountering certain errors on the backend connection. See <https://bz.apache.org/bugzilla/show_bug.cgi?id=63170>. [Stefan Eissing] git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1854365 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/http2/h2_mplx.c')
-rw-r--r--modules/http2/h2_mplx.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/modules/http2/h2_mplx.c b/modules/http2/h2_mplx.c
index 932c04e9b4..aad7beaa97 100644
--- a/modules/http2/h2_mplx.c
+++ b/modules/http2/h2_mplx.c
@@ -429,7 +429,7 @@ static int stream_cancel_iter(void *ctx, void *val) {
void h2_mplx_release_and_join(h2_mplx *m, apr_thread_cond_t *wait)
{
apr_status_t status;
- int i, wait_secs = 60;
+ int i, wait_secs = 60, old_aborted;
ap_log_cerror(APLOG_MARK, APLOG_TRACE2, 0, m->c,
"h2_mplx(%ld): start release", m->id);
@@ -440,6 +440,12 @@ void h2_mplx_release_and_join(h2_mplx *m, apr_thread_cond_t *wait)
H2_MPLX_ENTER_ALWAYS(m);
+ /* While really terminating any slave connections, treat the master
+ * connection as aborted. It's not as if we could send any more data
+ * at this point. */
+ old_aborted = m->c->aborted;
+ m->c->aborted = 1;
+
/* How to shut down a h2 connection:
* 1. cancel all streams still active */
while (!h2_ihash_iter(m->streams, stream_cancel_iter, m)) {
@@ -484,6 +490,7 @@ void h2_mplx_release_and_join(h2_mplx *m, apr_thread_cond_t *wait)
h2_ihash_iter(m->shold, unexpected_stream_iter, m);
}
+ m->c->aborted = old_aborted;
H2_MPLX_LEAVE(m);
ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, m->c,