Skip to content

Commit e4b4241

Browse files
committed
WIP: quic: Add a BUG_ON to qc_send()
This is to ensure qc_send() respects the <max_dgrams> limit passed as parameter.
1 parent 09c0df0 commit e4b4241

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/quic_tx.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -882,6 +882,7 @@ int qc_send(struct quic_conn *qc, int old_data, struct list *send_list,
882882
}
883883

884884
ret += prep_pkts;
885+
BUG_ON(max_dgrams && ret > max_dgrams);
885886
if (max_dgrams && ret >= max_dgrams) {// && !LIST_ISEMPTY(send_list)) {
886887
TRACE_DEVEL("stopping for artificial pacing", QUIC_EV_CONN_TXPKT, qc);
887888
break;

0 commit comments

Comments
 (0)