diff --git a/src/checks.c b/src/checks.c index b0de77088..78d4e390b 100644 --- a/src/checks.c +++ b/src/checks.c @@ -1625,7 +1625,8 @@ static int connect_conn_chk(struct task *t) clear_addr(&conn->addr.from); conn_prepare(conn, proto, check->xprt); - conn_install_mux(conn, &mux_pt_ops, cs, s->proxy, NULL); + if (conn_install_mux(conn, &mux_pt_ops, cs, s->proxy, NULL) < 0) + return SF_ERR_RESOURCE; cs_attach(cs, check, &check_conn_cb); /* only plain tcp-check supports quick ACK */ @@ -2818,7 +2819,8 @@ static int tcpcheck_main(struct check *check) } conn_prepare(conn, proto, xprt); - conn_install_mux(conn, &mux_pt_ops, cs, proxy, NULL); + if (conn_install_mux(conn, &mux_pt_ops, cs, proxy, NULL) < 0) + return SF_ERR_RESOURCE; cs_attach(cs, check, &check_conn_cb); ret = SF_ERR_INTERNAL;