From: Mladen Turk Date: Sun, 2 Jan 2005 08:00:26 +0000 (+0000) Subject: Kill the pool cleanup when closing non cachable connection. X-Git-Tag: 2.1.3~208 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6ef95d4e37b1071d440f6b6c36021919430ef508;p=thirdparty%2Fapache%2Fhttpd.git Kill the pool cleanup when closing non cachable connection. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@123884 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/proxy/proxy_util.c b/modules/proxy/proxy_util.c index fda9ccd459d..5defd0c7ded 100644 --- a/modules/proxy/proxy_util.c +++ b/modules/proxy/proxy_util.c @@ -1664,10 +1664,14 @@ ap_proxy_determine_connection(apr_pool_t *p, request_rec *r, if (r->proxyreq == PROXYREQ_PROXY || r->proxyreq == PROXYREQ_REVERSE || !worker->is_address_reusable) { /* TODO: Check if the connection can be reused - */ - if (conn->sock) { - apr_socket_close(conn->sock); - conn->sock = NULL; + */ + if (conn->connection) { + if (conn->sock) { + apr_socket_close(conn->sock); + conn->sock = NULL; + } + apr_pool_cleanup_kill(conn->connection->pool, conn, connection_cleanup); + conn->connection = NULL; } err = apr_sockaddr_info_get(&(conn->addr), conn->hostname, APR_UNSPEC, @@ -1693,6 +1697,9 @@ ap_proxy_determine_connection(apr_pool_t *p, request_rec *r, conn->addr = worker->cp->addr; PROXY_THREAD_UNLOCK(worker); } + else + conn->addr = worker->cp->addr; + if (err != APR_SUCCESS) { return ap_proxyerror(r, HTTP_BAD_GATEWAY, apr_pstrcat(p, "DNS lookup failure for: ",