From: Baptiste Assmann Date: Mon, 3 Feb 2014 21:38:15 +0000 (+0100) Subject: BUG/MINOR: tcpcheck connect wrong behavior X-Git-Tag: v1.5-dev23~179 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f621bea;p=thirdparty%2Fhaproxy.git BUG/MINOR: tcpcheck connect wrong behavior A typo made first step of a tcpcheck to be a connect step. This patch prevents this behavior. The bug was introduced in 1.5-dev22 with "tcp-check connect" and only affects these directives. No backport is needed. --- diff --git a/src/checks.c b/src/checks.c index c3051aa43b..80f0bc0d30 100644 --- a/src/checks.c +++ b/src/checks.c @@ -1578,8 +1578,12 @@ static struct task *process_chk(struct task *t) } if (check->type == PR_O2_TCPCHK_CHK) { - tcpcheck_main(conn); - return t; + struct tcpcheck_rule *r = (struct tcpcheck_rule *) s->proxy->tcpcheck_rules.n; + /* if first step is a 'connect', then tcpcheck_main must run it */ + if (r->action == TCPCHK_ACT_CONNECT) { + tcpcheck_main(conn); + return t; + } }