]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: connection: Add private connections synchronously in session server list
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 1 Jul 2020 14:10:06 +0000 (16:10 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 15 Jul 2020 12:08:14 +0000 (14:08 +0200)
commit08016ab82d51b4e0dcc891b860d70fed25392129
treed8dc721dd78b8a1bc486254bd41514c9beb4fe9e
parent21ddc74e8a9c20310c39b1a8b6fc284616fa8c3a
MEDIUM: connection: Add private connections synchronously in session server list

When a connection is marked as private, it is now added in the session server
list. We don't wait a stream is detached from the mux to do so. When the
connection is created, this happens after the mux creation. Otherwise, it is
performed when the connection is marked as private.

To allow that, when a connection is created, the session is systematically set
as the connectin owner. Thus, a backend connection has always a owner during its
creation. And a private connection has always a owner until its death.

Note that outside the detach() callback, if the call to session_add_conn()
failed, the error is ignored. In this situation, we retry to add the connection
into the session server list in the detach() callback. If this fails at this
step, the multiplexer is destroyed and the connection is closed.
include/haproxy/session.h
src/backend.c
src/connection.c
src/http_ana.c
src/mux_fcgi.c
src/mux_h1.c
src/mux_h2.c