mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-09 16:47:18 +02:00
BUG/MEDIUM: checks: Check that conn_install_mux succeeded.
If conn_install_mux failed, then the connection has no mux and won't be usable, so just give up is on failure instead of ignoring it. This should be backported to 1.9.
This commit is contained in:
parent
f1e6fa35de
commit
f67be93ae0
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user