From 69670e88bddbaf60e3abbfaf7a151ce2e11b952f Mon Sep 17 00:00:00 2001 From: Amaury Denoyelle Date: Wed, 3 May 2023 09:50:04 +0200 Subject: [PATCH] BUG/MINOR: mux-quic: no need to subscribe for detach streams When detach is conducted by stream endpoint layer, a stream is either freed or just flagged as detached if the transfer is not yet finished. In the latter case, the stream will be finally freed via qc_purge_streams() which is called periodically. A subscribe was done on quic-conn layer if a stream cannot be freed via qc_purge_streams() as this means FIN STREAM has not yet been sent. However, this is unnecessary as either HTX EOM was not yet received and we are waiting for the upper layer, or FIN stream is still in the buffer but was not yet transmitted due to an incomplete transfer, in which case a subscribe should have already been done. This should be backported up to 2.7. --- src/mux_quic.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/mux_quic.c b/src/mux_quic.c index 259c7433f..fa4abf8e0 100644 --- a/src/mux_quic.c +++ b/src/mux_quic.c @@ -2091,9 +2091,6 @@ static int qc_purge_streams(struct qcc *qcc) release = 1; continue; } - - qcc->conn->xprt->subscribe(qcc->conn, qcc->conn->xprt_ctx, - SUB_RETRY_SEND, &qcc->wait_event); } }