]> granicus.if.org Git - apache/commitdiff
mod_http2: enable re-use of slave connections again.
authorStefan Eissing <icing@apache.org>
Thu, 24 Jan 2019 15:25:52 +0000 (15:25 +0000)
committerStefan Eissing <icing@apache.org>
Thu, 24 Jan 2019 15:25:52 +0000 (15:25 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1852038 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/http2/h2_conn.c
modules/http2/h2_mplx.c
modules/http2/h2_task.c

diff --git a/CHANGES b/CHANGES
index a83bd10ae55a5dd7930ba46a8527da3bd6e0ddb1..6bee2dd9543c7423892e7889df4b2c3a86686b9d 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,8 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.5.1
 
+  *) mod_http2: enable re-use of slave connections again. [Stefan Eissing]
+
   *) mod_proxy_wstunnel: Fix websocket proxy over UDS.
      PR 62932 <pavel dcmsys.com>
   
index 827217d90305ac44b4d0b21a924c15a57fe7a702..16b82282cc74bd67ab046fce164c3b5ccf8a7b6c 100644 (file)
@@ -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);
 }
 
index 15ca108cd549a369100bfc2c100202607f48f472..0e764f67f0f863e777d07cc569bd6cb88c63e4c9 100644 (file)
@@ -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);
index 690250f1f08916c5585dcfd4ab63e8df78bce48d..f7aa0bdcc4bf57cc53f073d3a1fa7e0a09bc2bb7 100644 (file)
@@ -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;
     }