Commit f235fb05 authored by Paul Querna's avatar Paul Querna
Browse files

Make the max time from when we last saw a host a compile time option.

Suggested by: Ruediger Pluem


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@723685 13f79535-47bb-0310-9956-ffa450edef68
parent e6471410
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -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 @@ 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;
            }