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);