MINOR: checks: call conn_init() to properly initialize the connection.

This ensures we don't forget to set some fields such as obj_type.
This commit is contained in:
Willy Tarreau 2013-10-14 17:29:15 +02:00
parent d015577428
commit 4bdae8aa82

View File

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