]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: tcpcheck: Remove useless test on the stream-connector in tcpcheck_main
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 30 May 2022 06:37:39 +0000 (08:37 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 30 May 2022 06:37:40 +0000 (08:37 +0200)
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.

src/tcpcheck.c

index da3d21f53a905221acb02f77310187976365d646..1c6d083c8d24bf1bd5331120e951b95b41d09fa1 100644 (file)
@@ -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;