Skip to content

Commit 197eaaa

Browse files
committed
BUG/MINOR: mux-spop: Don't open new streams for SPOP connection on error
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.
1 parent cbc10b8 commit 197eaaa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/mux_spop.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,7 @@ static int spop_avail_streams(struct connection *conn)
605605
int ret1, ret2;
606606

607607
/* Don't open new stream if the connection is closed */
608-
if (spop_conn->state == SPOP_CS_CLOSED)
608+
if (spop_conn->state >= SPOP_CS_ERROR || (spop_conn->flags & (SPOP_CF_ERR_PENDING|SPOP_CF_ERROR)))
609609
return 0;
610610

611611
/* May be negative if this setting has changed */

0 commit comments

Comments
 (0)