Skip to content

Commit

Permalink
WIP: quic: Add a BUG_ON to qc_send()
Browse files Browse the repository at this point in the history
This is to ensure qc_send() respects the <max_dgrams> limit passed
as parameter.
  • Loading branch information
haproxyFred committed Nov 15, 2024
1 parent f5fe62f commit e6edbf5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/quic_tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -880,6 +880,7 @@ int qc_send(struct quic_conn *qc, int old_data, struct list *send_list,
}

ret += prep_pkts;
BUG_ON(max_dgrams && ret > max_dgrams);
if (max_dgrams && ret == max_dgrams && !LIST_ISEMPTY(send_list)) {
TRACE_DEVEL("stopping for artificial pacing", QUIC_EV_CONN_TXPKT, qc);
break;
Expand Down

0 comments on commit e6edbf5

Please sign in to comment.