1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-08 15:02:10 +03:00

allow balancer-manager to also accept subsecond intervals

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1799482 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jim Jagielski
2017-06-21 16:24:00 +00:00
parent 5a9e731a76
commit d1c3e06c4a

View File

@@ -22,6 +22,7 @@
#include "apr_version.h" #include "apr_version.h"
#include "ap_hooks.h" #include "ap_hooks.h"
#include "apr_date.h" #include "apr_date.h"
#include "mod_watchdog.h"
static const char *balancer_mutex_type = "proxy-balancer-shm"; static const char *balancer_mutex_type = "proxy-balancer-shm";
ap_slotmem_provider_t *storage = NULL; ap_slotmem_provider_t *storage = NULL;
@@ -1140,9 +1141,11 @@ static int balancer_handler(request_rec *r)
} }
} }
if ((val = apr_table_get(params, "w_hi"))) { if ((val = apr_table_get(params, "w_hi"))) {
int ival = atoi(val); apr_interval_time_t hci;
if (ival >= HCHECK_WATHCHDOG_INTERVAL) { if (ap_timeout_parameter_parse(val, &hci, "s") == APR_SUCCESS) {
wsel->s->interval = apr_time_from_sec(ival); if (hci >= AP_WD_TM_SLICE) {
wsel->s->interval = hci;
}
} }
} }
if ((val = apr_table_get(params, "w_hp"))) { if ((val = apr_table_get(params, "w_hp"))) {