]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Don't just hardcode 30 seconds as the poll timeout.
authorGarrett Rooney <rooneg@apache.org>
Sun, 5 Mar 2006 07:30:50 +0000 (07:30 +0000)
committerGarrett Rooney <rooneg@apache.org>
Sun, 5 Mar 2006 07:30:50 +0000 (07:30 +0000)
* 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.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/fcgi-proxy-dev@383292 13f79535-47bb-0310-9956-ffa450edef68

modules/proxy/mod_proxy_fcgi.c

index 8917986e6cb615da9661f15783e4e173d47c4b88..0ea4c7674df47c7e658191ae89b6db646e1e02e3 100644 (file)
@@ -519,11 +519,17 @@ static apr_status_t dispatch(proxy_conn_rec *conn, request_rec *r,
     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;
         }