]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: muxes: Pass the context of the mux to destroy() instead of the connection
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 8 Apr 2019 09:23:22 +0000 (11:23 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 12 Apr 2019 20:06:53 +0000 (22:06 +0200)
commit73c1207c7196f3c1fc814e424e6b486cc5f3afb2
tree56c4509156ae5c5e56f204c1487cbc5e65a76ca0
parent51f73eb11a24d1a45479b81104033b084aaee050
MINOR: muxes: Pass the context of the mux to destroy() instead of the connection

It is mandatory to handle mux upgrades, because during a mux upgrade, the
connection will be reassigned to another multiplexer. So when the old one is
destroyed, it does not own the connection anymore. Or in other words, conn->ctx
does not point to the old mux's context when its destroy() callback is
called. So we now rely on the multiplexer context do destroy it instead of the
connection.

In addition, h1_release() and h2_release() have also been updated in the same
way.
include/proto/session.h
include/types/connection.h
src/backend.c
src/mux_h1.c
src/mux_h2.c
src/mux_pt.c
src/server.c
src/session.c