BUG/MINOR: checks: Handle synchronous connect when a tcpcheck is started
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 6 May 2021 14:01:18 +0000 (16:01 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 7 May 2021 13:46:21 +0000 (15:46 +0200)
commit67da481a105f1c030eb971818a6b43bb2b5ba0bf
treea26cf735d29fd4a4605d050f3b579d325d4ac339
parentd2d264fe64dfc5d9eaa690371d86c972149023ac
BUG/MINOR: checks: Handle synchronous connect when a tcpcheck is started

A connection may be synchronously established. In the tcpcheck context, it
may be a problem if several connections come one after another. In this
case, there is no event to close the very first connection before starting
the next one. The checks is thus blocked and timed out, a L7 timeout error
is reported.

To fix the bug, when a tcpcheck is started, we immediately evaluate its
state. Most of time, nothing is performed and we must wait. But it is thus
possible to handle the result of a successfull connection.

This patch should fix the issue #1234. It must be backported as far as 2.2.

(cherry picked from commit 92017a3215545c26cd9baad11a1cdfb2859acc6c)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/check.c