mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-01-19 12:10:46 +00:00
MINOR: mux-quic: remove uneeded code to check fin on TX
Remove a wrong comparaison with the same buffer on both sides. In any cases, the FIN is properly set by qcs_push_frame only when the payload has been totally emptied.
This commit is contained in:
parent
5ede40be67
commit
fecfa0d822
@ -136,6 +136,7 @@ static int qcs_push_frame(struct qcs *qcs, struct buffer *payload, int fin, uint
|
||||
goto err;
|
||||
|
||||
total = b_force_xfer(buf, payload, to_xfer);
|
||||
/* FIN is positioned only when the buffer has been totally emptied. */
|
||||
fin = fin && !b_data(payload);
|
||||
frm->type = QUIC_FT_STREAM_8;
|
||||
if (fin)
|
||||
@ -177,16 +178,7 @@ static int qc_send(struct qcc *qcc)
|
||||
struct qcs *qcs = container_of(node, struct qcs, by_id);
|
||||
struct buffer *buf = &qcs->tx.buf;
|
||||
if (b_data(buf)) {
|
||||
char fin = 0;
|
||||
|
||||
/* if FIN is activated, ensure the buffer to
|
||||
* send is the last
|
||||
*/
|
||||
if (qcs->flags & QC_SF_FIN_STREAM) {
|
||||
BUG_ON(b_data(&qcs->tx.buf) < b_data(buf));
|
||||
fin = (b_data(&qcs->tx.buf) - b_data(buf) == 0);
|
||||
}
|
||||
|
||||
char fin = qcs->flags & QC_SF_FIN_STREAM;
|
||||
ret = qcs_push_frame(qcs, buf, fin, qcs->tx.offset);
|
||||
if (ret < 0)
|
||||
ABORT_NOW();
|
||||
|
Loading…
Reference in New Issue
Block a user