You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rp...@apache.org on 2008/10/15 02:53:39 UTC
svn commit: r704753 - in /httpd/httpd/trunk: CHANGES
modules/proxy/proxy_util.c
Author: rpluem
Date: Tue Oct 14 17:53:39 2008
New Revision: 704753
URL: http://svn.apache.org/viewvc?rev=704753&view=rev
Log:
* Revert r703998.
The call to apr_socket_timeout_set before apr_socket_connect already sets the
socket to non-blocking mode because the timeout of the socket is -1 after creation. A further
call to apr_socket_timeout_set (after the connect call does not do this, because the old
and the new timeout are >=0). The further code expects the socket to be in non-blocking
mode, otherwise we have regressions with ssl. This can be notified by running t/ssl/proxy
on 2.2.x which runs much much slower with the patch applied. This does not happen
on trunk because the socket is set back to non blocking by the core output filter
(async write completion).
Modified:
httpd/httpd/trunk/CHANGES
httpd/httpd/trunk/modules/proxy/proxy_util.c
Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=704753&r1=704752&r2=704753&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Tue Oct 14 17:53:39 2008
@@ -2,10 +2,6 @@
Changes with Apache 2.3.0
[ When backported to 2.2.x, remove entry from this file ]
- *) mod_proxy: Make the connection timeout to backends work by temporarily
- setting the socket to non blocking mode.
- [Matt Stevenson <mavricknzwork yahoo.com>]
-
*) Worker MPM: Crosscheck that idle workers are still available before using
them and thus preventing an overflow of the worker queue which causes
a SegFault. PR 45605 [Denis Ustimenko <denusk gmail.com>]
Modified: httpd/httpd/trunk/modules/proxy/proxy_util.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/proxy_util.c?rev=704753&r1=704752&r2=704753&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/proxy_util.c (original)
+++ httpd/httpd/trunk/modules/proxy/proxy_util.c Tue Oct 14 17:53:39 2008
@@ -2358,17 +2358,6 @@
"proxy: %s: fam %d socket created to connect to %s",
proxy_function, backend_addr->family, worker->hostname);
- /*
- * Temporarily set the socket to non blocking to make connection
- * timeouts (set via connectiontimeout) work.
- */
- if ((rv = apr_socket_opt_set(newsock, APR_SO_NONBLOCK, 1))
- != APR_SUCCESS) {
- ap_log_error(APLOG_MARK, APLOG_ERR, rv, s,
- "apr_socket_opt_set(SO_NONBLOCK): Failed to set"
- " the socket to non blocking mode");
- }
-
/* make the connection out of the socket */
rv = apr_socket_connect(newsock, backend_addr);
@@ -2385,13 +2374,6 @@
continue;
}
- if ((rv = apr_socket_opt_set(newsock, APR_SO_NONBLOCK, 0))
- != APR_SUCCESS) {
- ap_log_error(APLOG_MARK, APLOG_ERR, rv, s,
- "apr_socket_opt_set(SO_NONBLOCK): Failed to set"
- " the socket to blocking mode");
- }
-
/* Set a timeout on the socket */
if (worker->timeout_set == 1) {
apr_socket_timeout_set(newsock, worker->timeout);