summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMladen Turk <mturk@apache.org>2005-01-02 08:00:26 +0000
committerMladen Turk <mturk@apache.org>2005-01-02 08:00:26 +0000
commit6ef95d4e37b1071d440f6b6c36021919430ef508 (patch)
treeaacfeda5ead8e9f723e0b2d66fde8514228ffdbf
parentd962fcfc8b3946aa999f0e231170837f4922ccb5 (diff)
downloadhttpd-6ef95d4e37b1071d440f6b6c36021919430ef508.tar.gz
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
-rw-r--r--modules/proxy/proxy_util.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/modules/proxy/proxy_util.c b/modules/proxy/proxy_util.c
index fda9ccd459..5defd0c7de 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: ",