From: Christopher Faulet Date: Sat, 2 May 2020 07:08:54 +0000 (+0200) Subject: BUG/MEDIUM: mux-fcgi: Return from detach if server don't keep the connection X-Git-Tag: v2.2-dev7~30 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=66cd57ef5aedec9c2d33c1ecce791806c98349b4;p=thirdparty%2Fhaproxy.git BUG/MEDIUM: mux-fcgi: Return from detach if server don't keep the connection When the last stream is detached from a FCGI connection, if the server don't add the connection in its idle list, the connection is destroyed. Thus it is important to exist immediately from the detach function. A return statement is missing here. This bug was introduced in the commit 2444aa5b6 ("MEDIUM: sessions: Don't be responsible for connections anymore."). It is a 2.2-dev bug. No need to backport. --- diff --git a/src/mux_fcgi.c b/src/mux_fcgi.c index cef3074a3c..f6a2f7c143 100644 --- a/src/mux_fcgi.c +++ b/src/mux_fcgi.c @@ -3542,6 +3542,7 @@ static void fcgi_detach(struct conn_stream *cs) /* let's kill the connection right away */ fconn->conn->mux->destroy(fconn); TRACE_DEVEL("outgoing connection killed", FCGI_EV_STRM_END|FCGI_EV_FCONN_ERR); + return; } } }