From: Christopher Faulet Date: Fri, 20 Nov 2020 17:13:02 +0000 (+0100) Subject: MINOR: check: Always increment check health counter on CONPASS X-Git-Tag: v2.4-dev2~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1e527cbf53d0a97a61bb5d710cc15d3e3f4ffe85;p=thirdparty%2Fhaproxy.git MINOR: check: Always increment check health counter on CONPASS Regarding the health counter, a check finished with the CONDPASS result is now the same than with the PASSED result: The health counter is always incemented. Before, it was only performed is the health counter was not 0. There is no change for the disable-on-404 option because it is only evaluated for running or stopping servers. So with an health check counter greater than 0. But it will make possible to handle (STOPPED -> STOPPING) transition for servers. --- diff --git a/src/check.c b/src/check.c index bedcff1951..edcaf327c8 100644 --- a/src/check.c +++ b/src/check.c @@ -269,9 +269,8 @@ void set_server_check_status(struct check *check, short status, const char *desc break; case CHK_RES_PASSED: - case CHK_RES_CONDPASS: /* "condpass" cannot make the first step but it OK after a "passed" */ - if ((check->health < check->rise + check->fall - 1) && - (check->result == CHK_RES_PASSED || check->health > 0)) { + case CHK_RES_CONDPASS: + if (check->health < check->rise + check->fall - 1) { report = 1; check->health++;