diff options
| author | Vladimir Homutov <vl@nginx.com> | 2020-05-21 15:41:01 +0300 |
|---|---|---|
| committer | Vladimir Homutov <vl@nginx.com> | 2020-05-21 15:41:01 +0300 |
| commit | 444432047396953152485773398d7c636b76f5eb (patch) | |
| tree | 617689c186460d07a039b74e5b5a2c68753ce252 | |
| parent | 7e0314de24fb9f48931aff8023a9cbe597991800 (diff) | |
| download | nginx-444432047396953152485773398d7c636b76f5eb.tar.gz nginx-444432047396953152485773398d7c636b76f5eb.tar.bz2 | |
Fixed retransmission of frames after closing connection.
Frames in sent queues are discarded, as no acknowledgment is expected
if the connection is closing.
| -rw-r--r-- | src/event/ngx_event_quic.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/event/ngx_event_quic.c b/src/event/ngx_event_quic.c index f7191f51d..71e21310c 100644 --- a/src/event/ngx_event_quic.c +++ b/src/event/ngx_event_quic.c @@ -1165,6 +1165,7 @@ static ngx_int_t ngx_quic_close_quic(ngx_connection_t *c, ngx_int_t rc) { ngx_uint_t i, err; + ngx_quic_send_ctx_t *ctx; ngx_quic_connection_t *qc; enum ssl_encryption_level_t level; @@ -1172,6 +1173,12 @@ ngx_quic_close_quic(ngx_connection_t *c, ngx_int_t rc) if (!qc->closing) { + /* drop packets from retransmit queues, no ack is expected */ + for (i = 0; i < NGX_QUIC_SEND_CTX_LAST; i++) { + ctx = ngx_quic_get_send_ctx(qc, i); + ngx_quic_free_frames(c, &ctx->sent); + } + level = (qc->state == ssl_encryption_early_data) ? ssl_encryption_application : qc->state; |
