httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pque...@apache.org
Subject svn commit: r723685 - /httpd/httpd/trunk/modules/proxy/balancers/mod_lbmethod_heartbeat.c
Date Fri, 05 Dec 2008 09:29:52 GMT
Author: pquerna
Date: Fri Dec  5 01:29:52 2008
New Revision: 723685

URL: http://svn.apache.org/viewvc?rev=723685&view=rev
Log:
Make the max time from when we last saw a host a compile time option.
Suggested by: Ruediger Pluem

Modified:
    httpd/httpd/trunk/modules/proxy/balancers/mod_lbmethod_heartbeat.c

Modified: httpd/httpd/trunk/modules/proxy/balancers/mod_lbmethod_heartbeat.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/balancers/mod_lbmethod_heartbeat.c?rev=723685&r1=723684&r2=723685&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/balancers/mod_lbmethod_heartbeat.c (original)
+++ httpd/httpd/trunk/modules/proxy/balancers/mod_lbmethod_heartbeat.c Fri Dec  5 01:29:52
2008
@@ -20,6 +20,13 @@
 #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 @@
 
         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;
             }



Mime
View raw message