]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: tcp-check: don't condition data polling on check type
authorWilly Tarreau <w@1wt.eu>
Mon, 8 Dec 2014 10:26:08 +0000 (11:26 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 8 Dec 2014 10:28:18 +0000 (11:28 +0100)
tcp_check_main() would condition the polling for writes on check->type,
but this is absurd given that check->type == PR_O2_TCPCHK_CHK since this
is the only way we can get there! This patch removes this confusing test.

src/checks.c

index 03ddb26c44b6e4d7051a8e065b1e820e71ba97ed..f6fb23d5f585d8c533fa03758e86738b0e8a8dfd 100644 (file)
@@ -2496,7 +2496,7 @@ static void tcpcheck_main(struct connection *conn)
 
                        ret = SN_ERR_INTERNAL;
                        if (proto->connect)
-                               ret = proto->connect(conn, check->type, (check->type) ? 0 : 2);
+                               ret = proto->connect(conn, 1, 0);
                        conn->flags |= CO_FL_WAKE_DATA;
                        if (check->current_step->conn_opts & TCPCHK_OPT_SEND_PROXY) {
                                conn->send_proxy_ofs = 1;