]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: mux_pt: Don't call unsubscribe if we did not subscribe.
authorOlivier Houchard <cognet@ci0.org>
Sat, 10 Aug 2019 21:56:16 +0000 (23:56 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 16 Aug 2019 14:11:56 +0000 (16:11 +0200)
commitea32b0fa50aafc150a3f660cb55943fd181deab4
treeafc4ef78070980046b8bc6d4ac7dd20a07142dac
parentf5cab82025097a43e50d2b643fd7a2e3c49f97a9
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.
src/mux_pt.c