mirror of
https://github.com/apache/httpd.git
synced 2025-08-08 15:02:10 +03:00
mod_proxy: Make ap_proxy_retry_worker() into an optional function. Allows
mod_lbmethod_bybusyness, mod_lbmethod_byrequests, mod_lbmethod_bytraffic and mod_lbmethod_heartbeat to be loaded without mod_proxy yet being present, which happens when modules are loaded in alphabetical order. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1209754 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
#include "scoreboard.h"
|
||||
#include "apr_version.h"
|
||||
#include "apr_hash.h"
|
||||
#include "proxy_util.h"
|
||||
|
||||
#if APR_HAVE_UNISTD_H
|
||||
#include <unistd.h> /* for getpid() */
|
||||
@@ -1977,9 +1978,8 @@ PROXY_DECLARE(apr_status_t) ap_proxy_initialize_worker(proxy_worker *worker, ser
|
||||
return rv;
|
||||
}
|
||||
|
||||
PROXY_DECLARE(int) ap_proxy_retry_worker(const char *proxy_function,
|
||||
proxy_worker *worker,
|
||||
server_rec *s)
|
||||
static int ap_proxy_retry_worker(const char *proxy_function, proxy_worker *worker,
|
||||
server_rec *s)
|
||||
{
|
||||
if (worker->s->status & PROXY_WORKER_IN_ERROR) {
|
||||
if (apr_time_now() > worker->s->error_time + worker->s->retry) {
|
||||
@@ -3024,3 +3024,7 @@ PROXY_DECLARE(apr_status_t) ap_proxy_sync_balancer(proxy_balancer *b, server_rec
|
||||
return APR_SUCCESS;
|
||||
}
|
||||
|
||||
void proxy_util_register_hooks(apr_pool_t *p)
|
||||
{
|
||||
APR_REGISTER_OPTIONAL_FN(ap_proxy_retry_worker);
|
||||
}
|
||||
|
Reference in New Issue
Block a user