mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-05-04 20:46:11 +02:00
BUG/MINOR: backend: Don't get proto to use for webscoket if there is no server
In connect_server(), it is possible to have no server defined (dispatch mode or transparent backend). In that case, we must be carefull to check the srv variable in all calls involving the server. It was not perform at one place, when the protocol to use for websocket is retrieved. This must not be done when there is no server. This patch should fix the first report in #3144. It must be backported to all stable version.
This commit is contained in:
parent
bfe5a2c3d7
commit
af6b9a0967
@ -2204,7 +2204,7 @@ int connect_server(struct stream *s)
|
||||
*/
|
||||
if (may_start_mux_now) {
|
||||
const struct mux_ops *alt_mux =
|
||||
likely(!(s->flags & SF_WEBSOCKET)) ? NULL : srv_get_ws_proto(srv);
|
||||
likely(!(s->flags & SF_WEBSOCKET) || !srv) ? NULL : srv_get_ws_proto(srv);
|
||||
if (conn_install_mux_be(srv_conn, s->scb, s->sess, alt_mux) < 0) {
|
||||
conn_full_close(srv_conn);
|
||||
return SF_ERR_INTERNAL;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user