Commit 901bd9b0 authored by Victor J. Orlikowski's avatar Victor J. Orlikowski
Browse files

Add a timeout when making connections from within the proxy.

Now, if someone wants to add a special scoreboard state for proxy
attempting to make connection, be my guest.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89908 13f79535-47bb-0310-9956-ffa450edef68
parent 4df98666
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -222,6 +222,9 @@ int ap_proxy_connect_handler(request_rec *r, proxy_server_conf *conf,
        return HTTP_INTERNAL_SERVER_ERROR;
    }

    /* Set a timeout on the socket */
    apr_setsocketopt(sock, APR_SO_TIMEOUT, (int)(r->server->timeout * APR_USEC_PER_SEC));

	/*
	 * At this point we have a list of one or more IP addresses of
	 * the machine to connect to. If configured, reorder this
+3 −0
Original line number Diff line number Diff line
@@ -696,6 +696,9 @@ int ap_proxy_ftp_handler(request_rec *r, proxy_server_conf *conf,
#endif /*_OSD_POSIX*/
    }

    /* Set a timeout on the socket */
    apr_setsocketopt(sock, APR_SO_TIMEOUT, (int)(r->server->timeout * APR_USEC_PER_SEC));

    ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, r->server,
		 "proxy: FTP: socket has been created");

+3 −0
Original line number Diff line number Diff line
@@ -377,6 +377,9 @@ int ap_proxy_http_handler(request_rec *r, proxy_server_conf *conf,
	}
#endif

        /* Set a timeout on the socket */
        apr_setsocketopt(sock, APR_SO_TIMEOUT, (int)(r->server->timeout * APR_USEC_PER_SEC));

	ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, r->server,
		     "proxy: socket has been created");