BUG/MEDIUM: mux_pt: Don't call unsubscribe if we did not subscribe.

In mux_pt_attach(), don't inconditionally call unsubscribe, and only do so
if we were subscribed. The idea was that at this point we would always be
subscribed, as for the mux_pt attach would only be called after at least one
request, after which the mux_pt would have subscribed, but this is wrong.
We can also be called if for some reason the connection failed before the
xprt was created. And with no xprt, attempting to call unsubscribe will
probably lead to a crash.

This should be backported to 2.0.

(cherry picked from commit ea32b0fa50aafc150a3f660cb55943fd181deab4)
Signed-off-by: Willy Tarreau <w@1wt.eu>
1 file changed