]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
allow balancer-manager to also accept subsecond intervals
authorJim Jagielski <jim@apache.org>
Wed, 21 Jun 2017 16:24:00 +0000 (16:24 +0000)
committerJim Jagielski <jim@apache.org>
Wed, 21 Jun 2017 16:24:00 +0000 (16:24 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1799482 13f79535-47bb-0310-9956-ffa450edef68

modules/proxy/mod_proxy_balancer.c

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