# HG changeset patch # User Roman Arutyunyan # Date 1690450542 -14400 # Node ID e9a003d404855042d8a77a8ba677bbba4cd31591 # Parent d7dec29701615e996f2c3de3e1380dab18a34aea QUIC: fixed congesion control in GSO mode. In non-GSO mode, a datagram is sent if congestion window is not exceeded by the time of send. The window could be exceeded by a small amount after the send. In GSO mode, congestion window was checked in a similar way, but for all concatenated datagrams as a whole. This could result in exceeding congestion window by a lot. Now congestion window is checked for every datagram in GSO mode as well. diff -r d7dec2970161 -r e9a003d40485 src/event/quic/ngx_event_quic_output.c --- a/src/event/quic/ngx_event_quic_output.c Thu Aug 10 20:11:29 2023 +0400 +++ b/src/event/quic/ngx_event_quic_output.c Thu Jul 27 13:35:42 2023 +0400 @@ -358,7 +358,7 @@ len = ngx_min(segsize, (size_t) (end - p)); - if (len && cg->in_flight < cg->window) { + if (len && cg->in_flight + (p - dst) < cg->window) { n = ngx_quic_output_packet(c, ctx, p, len, len); if (n == NGX_ERROR) {