diff --git a/src/server.c b/src/server.c index ea6a325be..c73ffb33b 100644 --- a/src/server.c +++ b/src/server.c @@ -5009,7 +5009,12 @@ static int cli_parse_add_server(char **args, char *payload, struct appctx *appct srv->init_addr_methods = SRV_IADDR_NONE; if (srv->mux_proto) { - if (!conn_get_best_mux_entry(srv->mux_proto->token, PROTO_SIDE_BE, be->mode)) { + int proto_mode = conn_pr_mode_to_proto_mode(be->mode); + const struct mux_proto_list *mux_ent; + + mux_ent = conn_get_best_mux_entry(srv->mux_proto->token, PROTO_SIDE_BE, proto_mode); + + if (!mux_ent || !isteq(mux_ent->token, srv->mux_proto->token)) { ha_alert("MUX protocol is not usable for server.\n"); goto out; }