diff --git a/src/mux_quic.c b/src/mux_quic.c index 8b4658075..58695b0f3 100644 --- a/src/mux_quic.c +++ b/src/mux_quic.c @@ -564,10 +564,10 @@ static void qmux_ctrl_send(struct qc_stream_desc *stream, uint64_t data, uint64_ BUG_ON(offset > qcs->tx.fc.off_real); /* check if the STREAM frame has already been notified. It can happen - * for retransmission. + * for retransmission. Special care must be taken to ensure an empty + * STREAM frame with FIN set is not considered as retransmitted */ - if (offset + data < qcs->tx.fc.off_real || - (!data && (!(qcs->flags & QC_SF_FIN_STREAM) || qc_stream_buf_get(qcs->stream) || qcs_prep_bytes(qcs)))) { + if (offset + data < qcs->tx.fc.off_real || (!data && !(qcs->flags & QC_SF_FIN_STREAM))) { TRACE_DEVEL("offset already notified", QMUX_EV_QCS_SEND, qcc->conn, qcs); goto out; }