summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorStefan Eissing <icing@apache.org>2019-01-24 16:25:52 +0100
committerStefan Eissing <icing@apache.org>2019-01-24 16:25:52 +0100
commit7b490eddc13d8b197fb3a56c2b3b6a20b0b3bb4e (patch)
tree844e4e8d1ce077e1f250c3404586fb922f765cba /modules
parentreverting last change (diff)
downloadapache2-7b490eddc13d8b197fb3a56c2b3b6a20b0b3bb4e.tar.xz
apache2-7b490eddc13d8b197fb3a56c2b3b6a20b0b3bb4e.zip
mod_http2: enable re-use of slave connections again.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1852038 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r--modules/http2/h2_conn.c21
-rw-r--r--modules/http2/h2_mplx.c3
-rw-r--r--modules/http2/h2_task.c1
3 files changed, 12 insertions, 13 deletions
diff --git a/modules/http2/h2_conn.c b/modules/http2/h2_conn.c
index 827217d903..16b82282cc 100644
--- a/modules/http2/h2_conn.c
+++ b/modules/http2/h2_conn.c
@@ -370,17 +370,16 @@ apr_status_t h2_slave_run_pre_connection(conn_rec *slave, apr_socket_t *csd)
* (Not necessarily in pre_connection, but later. Set it here, so it
* is in place.) */
slave->keepalives = 1;
- /* We signal that this connection will be closed after the request.
- * Which is true in that sense that we throw away all traffic data
- * on this slave connection after each requests. Although we might
- * reuse internal structures like memory pools.
- * The wanted effect of this is that httpd does not try to clean up
- * any dangling data on this connection when a request is done. Which
- * is unneccessary on a h2 stream.
- */
- slave->keepalive = AP_CONN_CLOSE;
- return ap_run_pre_connection(slave, csd);
}
- return APR_SUCCESS;
+ /* We signal that this connection will be closed after the request.
+ * Which is true in that sense that we throw away all traffic data
+ * on this slave connection after each requests. Although we might
+ * reuse internal structures like memory pools.
+ * The wanted effect of this is that httpd does not try to clean up
+ * any dangling data on this connection when a request is done. Which
+ * is unneccessary on a h2 stream.
+ */
+ slave->keepalive = AP_CONN_CLOSE;
+ return ap_run_pre_connection(slave, csd);
}
diff --git a/modules/http2/h2_mplx.c b/modules/http2/h2_mplx.c
index 15ca108cd5..0e764f67f0 100644
--- a/modules/http2/h2_mplx.c
+++ b/modules/http2/h2_mplx.c
@@ -327,7 +327,8 @@ static int stream_destroy_iter(void *ctx, void *val)
&& !task->rst_error);
}
- if (reuse_slave && slave->keepalive == AP_CONN_KEEPALIVE) {
+ task->c = NULL;
+ if (reuse_slave) {
h2_beam_log(task->output.beam, m->c, APLOG_DEBUG,
APLOGNO(03385) "h2_task_destroy, reuse slave");
h2_task_destroy(task);
diff --git a/modules/http2/h2_task.c b/modules/http2/h2_task.c
index 690250f1f0..f7aa0bdcc4 100644
--- a/modules/http2/h2_task.c
+++ b/modules/http2/h2_task.c
@@ -545,7 +545,6 @@ h2_task *h2_task_create(conn_rec *slave, int stream_id,
void h2_task_destroy(h2_task *task)
{
if (task->output.beam) {
- h2_beam_log(task->output.beam, task->c, APLOG_TRACE2, "task_destroy");
h2_beam_destroy(task->output.beam);
task->output.beam = NULL;
}