From 1e527cbf53d0a97a61bb5d710cc15d3e3f4ffe85 Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Fri, 20 Nov 2020 18:13:02 +0100 Subject: [PATCH] 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. --- src/check.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/check.c b/src/check.c index bedcff195..edcaf327c 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++;