diff options
author | Jim Jagielski <jim@apache.org> | 2019-04-02 17:00:43 +0200 |
---|---|---|
committer | Jim Jagielski <jim@apache.org> | 2019-04-02 17:00:43 +0200 |
commit | f67237e46c0bb606449295c89184921a22a6eab4 (patch) | |
tree | b17d8ac49039bc7a9ecf7cd634da0a42551a85d3 /modules/proxy/proxy_util.c | |
parent | PR63305: fix graceful restart crashes in LDAP (diff) | |
download | apache2-f67237e46c0bb606449295c89184921a22a6eab4.tar.xz apache2-f67237e46c0bb606449295c89184921a22a6eab4.zip |
Fix for: [Bug 62372] Load balancer byrequests required when bytraffic chosen
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1856829 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/proxy/proxy_util.c')
-rw-r--r-- | modules/proxy/proxy_util.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/modules/proxy/proxy_util.c b/modules/proxy/proxy_util.c index 5abaf7e906..315fcca17b 100644 --- a/modules/proxy/proxy_util.c +++ b/modules/proxy/proxy_util.c @@ -1165,13 +1165,13 @@ PROXY_DECLARE(char *) ap_proxy_define_balancer(apr_pool_t *p, * exist, that's OK at this time. We check when we share and sync */ lbmethod = ap_lookup_provider(PROXY_LBMETHOD, "byrequests", "0"); - + (*balancer)->lbmethod = lbmethod; + (*balancer)->workers = apr_array_make(p, 5, sizeof(proxy_worker *)); #if APR_HAS_THREADS (*balancer)->gmutex = NULL; (*balancer)->tmutex = NULL; #endif - (*balancer)->lbmethod = lbmethod; if (do_malloc) bshared = ap_malloc(sizeof(proxy_balancer_shared)); @@ -1185,6 +1185,8 @@ PROXY_DECLARE(char *) ap_proxy_define_balancer(apr_pool_t *p, if (PROXY_STRNCPY(bshared->name, uri) != APR_SUCCESS) { return apr_psprintf(p, "balancer name (%s) too long", uri); } + (*balancer)->lbmethod_set = 1; + /* * We do the below for verification. The real sname will be * done post_config @@ -1239,6 +1241,7 @@ PROXY_DECLARE(apr_status_t) ap_proxy_share_balancer(proxy_balancer *balancer, lbmethod = ap_lookup_provider(PROXY_LBMETHOD, balancer->s->lbpname, "0"); if (lbmethod) { balancer->lbmethod = lbmethod; + balancer->lbmethod_set = 1; } else { ap_log_error(APLOG_MARK, APLOG_CRIT, 0, ap_server_conf, APLOGNO(02432) "Cannot find LB Method: %s", balancer->s->lbpname); |