]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
* Do not register connection_cleanup as cleanup for the conn->pool. In the past
authorRuediger Pluem <rpluem@apache.org>
Wed, 12 Dec 2007 10:38:19 +0000 (10:38 +0000)
committerRuediger Pluem <rpluem@apache.org>
Wed, 12 Dec 2007 10:38:19 +0000 (10:38 +0000)
  it was needed to register connection_cleanup as a cleanup for the frontend
  connection memory pool (c->pool) to ensure that connection returns into the
  connection pool if the memory pool of the frontend connection memory pool
  gets destroyed / cleared. Now we ensure explicitly the connection returns
  to the connection pool once we finished handling the request.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@603543 13f79535-47bb-0310-9956-ffa450edef68

modules/proxy/proxy_util.c

index b255b323dae2a84ede8bac6077723ea32196b245..92eb8f34c0e3344c838368a80906eb8947cabeb0 100644 (file)
@@ -1599,9 +1599,6 @@ static apr_status_t connection_cleanup(void *theconn)
     /* determine if the connection need to be closed */
     if (conn->close) {
         apr_pool_t *p = conn->pool;
-        if (conn->connection) {
-            apr_pool_cleanup_kill(p, conn, connection_cleanup);
-        }
         apr_pool_clear(p);
         memset(conn, 0, sizeof(proxy_conn_rec));
         conn->pool = p;
@@ -2311,13 +2308,6 @@ PROXY_DECLARE(int) ap_proxy_connection_create(const char *proxy_function,
         socket_cleanup(conn);
         return HTTP_INTERNAL_SERVER_ERROR;
     }
-    /*
-     * register the connection cleanup to client connection
-     * so that the connection can be closed or reused
-     */
-    apr_pool_cleanup_register(conn->pool, (void *)conn,
-                              connection_cleanup,
-                              apr_pool_cleanup_null);
 
     /* For ssl connection to backend */
     if (conn->is_ssl) {