httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jfcl...@apache.org
Subject svn commit: r550514 - /httpd/httpd/trunk/modules/proxy/proxy_util.c
Date Mon, 25 Jun 2007 14:29:55 GMT
Author: jfclere
Date: Mon Jun 25 07:29:54 2007
New Revision: 550514

URL: http://svn.apache.org/viewvc?view=rev&rev=550514
Log:
Fix the timeout logic. The order is now:
1 - worker->timeout
2 - proxy_conf->timeout
3 - server->timeout.
ap_get_module_config() is not perfect by that is easy to port back to 2.2.x.

Modified:
    httpd/httpd/trunk/modules/proxy/proxy_util.c

Modified: httpd/httpd/trunk/modules/proxy/proxy_util.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/proxy_util.c?view=diff&rev=550514&r1=550513&r2=550514
==============================================================================
--- httpd/httpd/trunk/modules/proxy/proxy_util.c (original)
+++ httpd/httpd/trunk/modules/proxy/proxy_util.c Mon Jun 25 07:29:54 2007
@@ -2167,6 +2167,9 @@
     int loglevel;
     apr_sockaddr_t *backend_addr = conn->addr;
     apr_socket_t *newsock;
+    void *sconf = s->module_config;
+    proxy_server_conf *conf =
+        (proxy_server_conf *) ap_get_module_config(sconf, &proxy_module);
 
     if (conn->sock) {
         /*
@@ -2214,6 +2217,9 @@
         /* Set a timeout on the socket */
         if (worker->timeout_set == 1) {
             apr_socket_timeout_set(newsock, worker->timeout);
+        }
+        else if (conf->timeout_set == 1) {
+            apr_socket_timeout_set(newsock, conf->timeout);
         }
         else {
              apr_socket_timeout_set(newsock, s->timeout);



Mime
View raw message