httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r123884 - /httpd/httpd/trunk/modules/proxy/proxy_util.c
Date Sun, 02 Jan 2005 08:00:29 GMT
Author: mturk
Date: Sun Jan  2 00:00:26 2005
New Revision: 123884

URL: http://svn.apache.org/viewcvs?view=rev&rev=123884
Log:
Kill the pool cleanup when closing non cachable connection.
Modified:
   httpd/httpd/trunk/modules/proxy/proxy_util.c

Modified: httpd/httpd/trunk/modules/proxy/proxy_util.c
Url: http://svn.apache.org/viewcvs/httpd/httpd/trunk/modules/proxy/proxy_util.c?view=diff&rev=123884&p1=httpd/httpd/trunk/modules/proxy/proxy_util.c&r1=123883&p2=httpd/httpd/trunk/modules/proxy/proxy_util.c&r2=123884
==============================================================================
--- httpd/httpd/trunk/modules/proxy/proxy_util.c	(original)
+++ httpd/httpd/trunk/modules/proxy/proxy_util.c	Sun Jan  2 00:00:26 2005
@@ -1664,10 +1664,14 @@
     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 @@
         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: ",

Mime
View raw message