From: Christopher Faulet Date: Mon, 30 May 2022 06:37:39 +0000 (+0200) Subject: CLEANUP: tcpcheck: Remove useless test on the stream-connector in tcpcheck_main X-Git-Tag: v2.6.0~56 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=560b8da258d03e0164d449983d28f9886c618e34;p=thirdparty%2Fhaproxy.git CLEANUP: tcpcheck: Remove useless test on the stream-connector in tcpcheck_main Thanks to the recent refactoring, when tcpcheck_main() function is called, the stream-connector of the healthchek is always defined. There is no reason to still test it. This patch should fix the issue #1721. --- diff --git a/src/tcpcheck.c b/src/tcpcheck.c index da3d21f53a..1c6d083c8d 100644 --- a/src/tcpcheck.c +++ b/src/tcpcheck.c @@ -2196,7 +2196,7 @@ int tcpcheck_main(struct check *check) check->current_step = rule; /* We are still waiting the connection gets closed */ - if (sc && (check->state & CHK_ST_CLOSE_CONN)) { + if (check->state & CHK_ST_CLOSE_CONN) { TRACE_DEVEL("wait previous connection closure", CHK_EV_TCPCHK_EVAL|CHK_EV_TCPCHK_CONN, check); eval_ret = TCPCHK_EVAL_WAIT; break;