]> git.kaiwu.me - nginx.git/commitdiff
QUIC: fixed frame threshold with a small stream buffer size
authorSourav Bhowmik <s.bhowmik@f5.com>
Wed, 23 Sep 2026 18:31:48 +0000 (11:31 -0700)
committerSergey Kandaurov <pluknet@nginx.com>
Fri, 25 Sep 2026 18:27:38 +0000 (22:27 +0400)
Since 2fb32ff (1.27.5), the connection frame threshold degraded to a
few or zero frames when using a small stream buffer.  The previously
hardcoded minimum of 10000 frames is now used.

src/event/quic/ngx_event_quic.c

index 09ce4b81ebdcb5df2d2e173ab5ed92e616ffbaeb..1802ea6f2bcf33b7f627152ba879cd218b0fc5a0 100644 (file)
@@ -322,6 +322,7 @@ ngx_quic_new_connection(ngx_connection_t *c, ngx_quic_conf_t *conf,
     qc->max_frames = (conf->max_concurrent_streams_uni
                       + conf->max_concurrent_streams_bidi)
                      * conf->stream_buffer_size / 2000;
+    qc->max_frames = ngx_max(qc->max_frames, 10000);
 
     if (pkt->validated && pkt->retried) {
         qc->tp.retry_scid.len = pkt->dcid.len;