diff options
author | Roman Arutyunyan <arut@nginx.com> | 2023-07-27 13:35:42 +0400 |
---|---|---|
committer | Roman Arutyunyan <arut@nginx.com> | 2023-07-27 13:35:42 +0400 |
commit | 968293d5e721b9c7ff4098ee76a3313b0b7fd2ac (patch) | |
tree | 002151aa0b542bda8a39f4e8f7077eb778760513 /src | |
parent | 6f5f17358ee6286e491f287eeda5cf2b3946bab6 (diff) | |
download | nginx-968293d5e721b9c7ff4098ee76a3313b0b7fd2ac.tar.gz nginx-968293d5e721b9c7ff4098ee76a3313b0b7fd2ac.zip |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/event/quic/ngx_event_quic_output.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/event/quic/ngx_event_quic_output.c b/src/event/quic/ngx_event_quic_output.c index 88b7df6ab..37de44c74 100644 --- a/src/event/quic/ngx_event_quic_output.c +++ b/src/event/quic/ngx_event_quic_output.c @@ -358,7 +358,7 @@ ngx_quic_create_segments(ngx_connection_t *c) 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) { |