httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From roo...@apache.org
Subject svn commit: r383292 - /httpd/httpd/branches/fcgi-proxy-dev/modules/proxy/mod_proxy_fcgi.c
Date Sun, 05 Mar 2006 07:30:51 GMT
Author: rooneg
Date: Sat Mar  4 23:30:50 2006
New Revision: 383292

URL: http://svn.apache.org/viewcvs?rev=383292&view=rev
Log:
Don't just hardcode 30 seconds as the poll timeout.

* modules/proxy/mod_proxy_fcgi.c
  (dispatch): Use the worker timeout for our polls, falling back to the
   old behavior of 30 seconds if there is no worker timeout set.

Modified:
    httpd/httpd/branches/fcgi-proxy-dev/modules/proxy/mod_proxy_fcgi.c

Modified: httpd/httpd/branches/fcgi-proxy-dev/modules/proxy/mod_proxy_fcgi.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/branches/fcgi-proxy-dev/modules/proxy/mod_proxy_fcgi.c?rev=383292&r1=383291&r2=383292&view=diff
==============================================================================
--- httpd/httpd/branches/fcgi-proxy-dev/modules/proxy/mod_proxy_fcgi.c (original)
+++ httpd/httpd/branches/fcgi-proxy-dev/modules/proxy/mod_proxy_fcgi.c Sat Mar  4 23:30:50
2006
@@ -519,11 +519,17 @@
     ob = apr_brigade_create(r->pool, c->bucket_alloc);
 
     while (! done) {
+        apr_interval_time_t timeout = conn->worker->timeout;
         apr_size_t len;
         int n;
 
-        /* XXX don't hardcode 30 seconds */
-        rv = apr_poll(&pfd, 1, &n, apr_time_from_sec(30));
+        /* We need SOME kind of timeout here, or virtually anything will
+         * cause timeout errors. */
+        if (! conn->worker->timeout_set) {
+            timeout = apr_time_from_sec(30);
+        }
+
+        rv = apr_poll(&pfd, 1, &n, timeout);
         if (rv != APR_SUCCESS) {
             break;
         }



Mime
View raw message