mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-23 06:41:32 +02:00
BUG/MEDIUM: peers: Handle mux creation failure.
If the mux fails to properly be created by conn_install_mux, fail, instead of silently ignoring it. This should be backported to 1.9.
This commit is contained in:
parent
2b09443e04
commit
ef60ff38fb
@ -2314,7 +2314,8 @@ static struct appctx *peer_session_create(struct peers *peers, struct peer *peer
|
|||||||
memcpy(&conn->addr.to, &peer->addr, sizeof(conn->addr.to));
|
memcpy(&conn->addr.to, &peer->addr, sizeof(conn->addr.to));
|
||||||
|
|
||||||
conn_prepare(conn, peer->proto, peer_xprt(peer));
|
conn_prepare(conn, peer->proto, peer_xprt(peer));
|
||||||
conn_install_mux(conn, &mux_pt_ops, cs, s->be, NULL);
|
if (conn_install_mux(conn, &mux_pt_ops, cs, s->be, NULL) < 0)
|
||||||
|
goto out_free_cs;
|
||||||
si_attach_cs(&s->si[1], cs);
|
si_attach_cs(&s->si[1], cs);
|
||||||
|
|
||||||
s->do_log = NULL;
|
s->do_log = NULL;
|
||||||
@ -2328,6 +2329,8 @@ static struct appctx *peer_session_create(struct peers *peers, struct peer *peer
|
|||||||
return appctx;
|
return appctx;
|
||||||
|
|
||||||
/* Error unrolling */
|
/* Error unrolling */
|
||||||
|
out_free_cs:
|
||||||
|
cs_free(cs);
|
||||||
out_free_conn:
|
out_free_conn:
|
||||||
conn_free(conn);
|
conn_free(conn);
|
||||||
out_free_strm:
|
out_free_strm:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user