]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: checks: call conn_init() to properly initialize the connection.
authorWilly Tarreau <w@1wt.eu>
Mon, 14 Oct 2013 15:29:15 +0000 (17:29 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 9 Dec 2013 14:40:23 +0000 (15:40 +0100)
This ensures we don't forget to set some fields such as obj_type.

src/checks.c

index 51e2fe44a96163684de46ebb2b099b771b870f23..d781b4c003a16cdcd7d692c5399fc2d1e114854e 100644 (file)
@@ -1540,10 +1540,9 @@ static struct task *process_chk(struct task *t)
                }
 
                /* prepare a new connection */
-               conn->flags = CO_FL_NONE;
-               conn->err_code = CO_ER_NONE;
-               conn->target = &s->obj_type;
+               conn_init(conn);
                conn_prepare(conn, &check_conn_cb, s->check_common.proto, s->check_common.xprt, check);
+               conn->target = &s->obj_type;
 
                /* no client address */
                clear_addr(&conn->addr.from);