BUG/MEDIUM: check: reuse srv proto only if using same mode
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 13 Nov 2020 11:34:56 +0000 (12:34 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 13 Nov 2020 15:26:10 +0000 (16:26 +0100)
commit0519bd4d04cc3455233d9a74c5d682a958fc02b2
treeeedc2798064a22f3f79890d0bf0b172ddd33127e
parent97fc8da2643531ade4163d6662f13f76fa59d677
BUG/MEDIUM: check: reuse srv proto only if using same mode

Only reuse the mux from server if the check is using the same mode.
For example, this prevents a tcp-check on a h2 server to select the h2
multiplexer instead of passthrough.

This bug was introduced by the following commit :
BUG/MEDIUM: checks: Use the mux protocol specified on the server line
It must be backported up to 2.2.

Fixes github issue #945.
src/check.c