diff --git a/include/haproxy/check-t.h b/include/haproxy/check-t.h index 5b80189ee..26290b44b 100644 --- a/include/haproxy/check-t.h +++ b/include/haproxy/check-t.h @@ -56,7 +56,7 @@ enum chk_result { #define CHK_ST_OUT_ALLOC 0x0080 /* check blocked waiting for output buffer allocation */ #define CHK_ST_CLOSE_CONN 0x0100 /* check is waiting that the connection gets closed */ #define CHK_ST_PURGE 0x0200 /* check must be freed */ -#define CHK_ST_SLEEPING 0x0400 /* check was sleeping */ +#define CHK_ST_SLEEPING 0x0400 /* check was sleeping, i.e. not currently bound to a thread */ #define CHK_ST_FASTINTER 0x0800 /* force fastinter check */ /* check status */ diff --git a/src/check.c b/src/check.c index 7359c2574..fce152a96 100644 --- a/src/check.c +++ b/src/check.c @@ -1754,7 +1754,7 @@ int init_srv_check(struct server *srv) ret |= ERR_ALERT | ERR_ABORT; goto out; } - srv->check.state |= CHK_ST_CONFIGURED | CHK_ST_ENABLED; + srv->check.state |= CHK_ST_CONFIGURED | CHK_ST_ENABLED | CHK_ST_SLEEPING; srv_take(srv); /* Only increment maxsock for servers from the configuration. Dynamic @@ -1817,7 +1817,7 @@ int init_srv_agent_check(struct server *srv) if (!srv->agent.inter) srv->agent.inter = srv->check.inter; - srv->agent.state |= CHK_ST_CONFIGURED | CHK_ST_ENABLED | CHK_ST_AGENT; + srv->agent.state |= CHK_ST_CONFIGURED | CHK_ST_ENABLED | CHK_ST_SLEEPING | CHK_ST_AGENT; srv_take(srv); /* Only increment maxsock for servers from the configuration. Dynamic