]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: mux: Teach the mux_pt how to deal with idle connections.
authorOlivier Houchard <ohouchard@haproxy.com>
Mon, 5 Nov 2018 17:28:43 +0000 (18:28 +0100)
committerWilly Tarreau <w@1wt.eu>
Sun, 18 Nov 2018 20:44:03 +0000 (21:44 +0100)
commitb6c32ee4c24917d1a2d9a00292aaf24416fadd87
tree3dd63d5877cb5fee2cd7fb6a893df736175eee9f
parent47e9a1ad4ef1b17090d6fd122e8162ac3a2be634
MEDIUM: mux: Teach the mux_pt how to deal with idle connections.

In order to make the mux_pt able to handle idle connections, give it its
own context, where it'll stores the connection, the current conn_stream if
any, and a wait_event, so that it can subscribe to I/O events.
Add a new parameter to the detach() method, that gives the mux a hint
if it should destroy the connection or not when detaching a conn_stream.
If 1, then the mux_pt immediately destroys the connecion, if 0, then it
just subscribes to any read event. If a read happens, it will call
conn_sock_drain(), and if there's a connection error, it'll free the
connection, after removing it from the idle list.
src/mux_pt.c