diff options
author | Ruediger Pluem <rpluem@apache.org> | 2010-12-23 17:43:43 +0100 |
---|---|---|
committer | Ruediger Pluem <rpluem@apache.org> | 2010-12-23 17:43:43 +0100 |
commit | cbe247d915ff6d144f6f113135a02754718b61fa (patch) | |
tree | 406d58704da8f1020de5fd381476737ef0508dd1 /modules/proxy/proxy_util.c | |
parent | * Do not fiddle around with the close field if we might have returned the (diff) | |
download | apache2-cbe247d915ff6d144f6f113135a02754718b61fa.tar.xz apache2-cbe247d915ff6d144f6f113135a02754718b61fa.zip |
* The concept of the cleaned flag is flawed: Once we returned the connection
to the pool we cannot longer rely on it as another thread could have leased
the connection in the meantime and might have modified it.
BUT: We only use this flag once we returned the connection to the pool.
So signal that we returned the connection to the pool by something that is
local to the thread, in this case set backend to NULL if we already have
returende the connection.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1052314 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r-- | modules/proxy/proxy_util.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/modules/proxy/proxy_util.c b/modules/proxy/proxy_util.c index 59ded45de1..85c52b3f7d 100644 --- a/modules/proxy/proxy_util.c +++ b/modules/proxy/proxy_util.c @@ -2105,7 +2105,6 @@ PROXY_DECLARE(int) ap_proxy_acquire_connection(const char *proxy_function, #if APR_HAS_THREADS (*conn)->inreslist = 0; #endif - (*conn)->cleaned = 0; return OK; } @@ -2114,13 +2113,10 @@ PROXY_DECLARE(int) ap_proxy_release_connection(const char *proxy_function, proxy_conn_rec *conn, server_rec *s) { - if (!conn->cleaned) { - ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, + ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, "proxy: %s: has released connection for (%s)", proxy_function, conn->worker->hostname); - connection_cleanup(conn); - conn->cleaned = 1; - } + connection_cleanup(conn); return OK; } |