BUG/MINOR: tcpcheck: Don't rearm the check timeout on each read
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 9 Dec 2020 18:46:38 +0000 (19:46 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 14 Dec 2020 08:34:38 +0000 (09:34 +0100)
commitcc554538e97102e51649167503eae093dd5c5998
tree54eb2009ca4ecde2bfc2ef8c30488f4c160121dd
parent18d989033b6afdc59b4e487ff3d97be13afd4d10
BUG/MINOR: tcpcheck: Don't rearm the check timeout on each read

The check timeout is used to limit a health-check execution. By default
inter timeout is used. But when defined the check timeout is used. In this
case, the inter timeout (or connect timeout) is used for the connection
establishment only. And the check timeout for the health-check
execution. Thus, it must be set after a successfull connect. It means it is
rearm at the end of each connect rule.

This patch with the previous one (BUG/MINOR: http-check: Use right condition
to consider HTX message as full) should solve the issue #991. It must be
backported as far as 2.2. On the 2.3 and 2.2, there are 2 places were the
connection establishement is handled. The check timeout must be set on both.

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