]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: mux-spop: Don't open new streams for SPOP connection on error
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 13 May 2025 16:35:29 +0000 (18:35 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 13 May 2025 17:51:40 +0000 (19:51 +0200)
Till now, only SPOP connections fully closed or those with a TCP connection on
error were concerned. But available streams could be reported for SPOP
connections in error or closing state. But in these states, no NOTIFY frames
will be sent and no ACK frames will be parsed. So, no new SPOP streams should be
opened.

This patch should be backported to 3.1.

src/mux_spop.c

index fbf1fcb13dbfa4bb41d6e57d46d1b6be1beb968f..87256ee50f8998f0d84731841896c9505d209b48 100644 (file)
@@ -605,7 +605,7 @@ static int spop_avail_streams(struct connection *conn)
        int ret1, ret2;
 
        /* Don't open new stream if the connection is closed */
-       if (spop_conn->state == SPOP_CS_CLOSED)
+       if (spop_conn->state >= SPOP_CS_ERROR || (spop_conn->flags & (SPOP_CF_ERR_PENDING|SPOP_CF_ERROR)))
                return 0;
 
        /* May be negative if this setting has changed */