Commit c0ae6e47 authored by Garrett Rooney's avatar Garrett Rooney
Browse files

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.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/fcgi-proxy-dev@383292 13f79535-47bb-0310-9956-ffa450edef68
parent 7485d862
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -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;
        }