diff options
| author | Roman Arutyunyan <arut@nginx.com> | 2023-05-02 17:54:53 +0400 |
|---|---|---|
| committer | Roman Arutyunyan <arut@nginx.com> | 2023-05-02 17:54:53 +0400 |
| commit | 2187e5e1d9667aa5d0c137186a3e91c3c88dfa23 (patch) | |
| tree | fceb6649b0e4da633f4500cd4f86a31f86c6ebb3 /src/event/quic/ngx_event_quic.c | |
| parent | af18ce35060288a393c3b3c0e30474353779bd77 (diff) | |
| download | nginx-2187e5e1d9667aa5d0c137186a3e91c3c88dfa23.tar.gz nginx-2187e5e1d9667aa5d0c137186a3e91c3c88dfa23.tar.bz2 | |
QUIC: optimized immediate close.
Previously, before sending CONNECTION_CLOSE to client, all pending frames
were sent. This is redundant and could prevent CONNECTION_CLOSE from being
sent due to congestion control. Now pending frames are freed and
CONNECTION_CLOSE is sent without congestion control, as advised by RFC 9002:
Packets containing frames besides ACK or CONNECTION_CLOSE frames
count toward congestion control limits and are considered to be in flight.
Diffstat (limited to 'src/event/quic/ngx_event_quic.c')
| -rw-r--r-- | src/event/quic/ngx_event_quic.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/event/quic/ngx_event_quic.c b/src/event/quic/ngx_event_quic.c index 9b342d7de..b4033bc3f 100644 --- a/src/event/quic/ngx_event_quic.c +++ b/src/event/quic/ngx_event_quic.c @@ -482,6 +482,7 @@ ngx_quic_close_connection(ngx_connection_t *c, ngx_int_t rc) /* drop packets from retransmit queues, no ack is expected */ for (i = 0; i < NGX_QUIC_SEND_CTX_LAST; i++) { + ngx_quic_free_frames(c, &qc->send_ctx[i].frames); ngx_quic_free_frames(c, &qc->send_ctx[i].sent); } |
