]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Make the max time from when we last saw a host a compile time option.
authorPaul Querna <pquerna@apache.org>
Fri, 5 Dec 2008 09:29:52 +0000 (09:29 +0000)
committerPaul Querna <pquerna@apache.org>
Fri, 5 Dec 2008 09:29:52 +0000 (09:29 +0000)
Suggested by: Ruediger Pluem

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@723685 13f79535-47bb-0310-9956-ffa450edef68

modules/proxy/balancers/mod_lbmethod_heartbeat.c

index aa88f280dec31af47da0a45a2eadb1a7464fdeb9..48fec263ac01383effb79f0af14f23bc86e681d3 100644 (file)
 #include "apr_version.h"
 #include "apr_hooks.h"
 
+#ifndef LBM_HEARTBEAT_MAX_LASTSEEN
+/* If we haven't seen a heartbeat in the last N seconds, don't count this IP
+ * as allive.
+ */
+#define LBM_HEARTBEAT_MAX_LASTSEEN (10)
+#endif
+
 module AP_MODULE_DECLARE_DATA lbmethod_heartbeat_module;
 
 typedef struct lb_hb_ctx_t
@@ -256,7 +263,7 @@ static proxy_worker *find_best_hb(proxy_balancer *balancer,
 
         if (PROXY_WORKER_IS_USABLE(worker)) {
             server->worker = worker;
-            if (server->seen < 10) {
+            if (server->seen < LBM_HEARTBEAT_MAX_LASTSEEN) {
                 openslots += server->ready;
                 APR_ARRAY_PUSH(up_servers, hb_server_t *) = server;
             }