From 4bdae8aa82c18a9b8773e1b4448f4156470f687b Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Mon, 14 Oct 2013 17:29:15 +0200 Subject: [PATCH] MINOR: checks: call conn_init() to properly initialize the connection. This ensures we don't forget to set some fields such as obj_type. --- src/checks.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/checks.c b/src/checks.c index 51e2fe44a..d781b4c00 100644 --- a/src/checks.c +++ b/src/checks.c @@ -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); -- 2.47.3