Mercurial > hg > nginx
comparison src/event/ngx_event_quic.c @ 8398:8bec0ac23cf9 quic
Fixed retransmission of frames after closing connection.
Frames in sent queues are discarded, as no acknowledgment is expected
if the connection is closing.
author | Vladimir Homutov <vl@nginx.com> |
---|---|
date | Thu, 21 May 2020 15:41:01 +0300 |
parents | 1245e274b9ba |
children | ffd362e87eb2 |
comparison
equal
deleted
inserted
replaced
8397:1245e274b9ba | 8398:8bec0ac23cf9 |
---|---|
1163 | 1163 |
1164 static ngx_int_t | 1164 static ngx_int_t |
1165 ngx_quic_close_quic(ngx_connection_t *c, ngx_int_t rc) | 1165 ngx_quic_close_quic(ngx_connection_t *c, ngx_int_t rc) |
1166 { | 1166 { |
1167 ngx_uint_t i, err; | 1167 ngx_uint_t i, err; |
1168 ngx_quic_send_ctx_t *ctx; | |
1168 ngx_quic_connection_t *qc; | 1169 ngx_quic_connection_t *qc; |
1169 enum ssl_encryption_level_t level; | 1170 enum ssl_encryption_level_t level; |
1170 | 1171 |
1171 qc = c->quic; | 1172 qc = c->quic; |
1172 | 1173 |
1173 if (!qc->closing) { | 1174 if (!qc->closing) { |
1175 | |
1176 /* drop packets from retransmit queues, no ack is expected */ | |
1177 for (i = 0; i < NGX_QUIC_SEND_CTX_LAST; i++) { | |
1178 ctx = ngx_quic_get_send_ctx(qc, i); | |
1179 ngx_quic_free_frames(c, &ctx->sent); | |
1180 } | |
1174 | 1181 |
1175 level = (qc->state == ssl_encryption_early_data) | 1182 level = (qc->state == ssl_encryption_early_data) |
1176 ? ssl_encryption_application | 1183 ? ssl_encryption_application |
1177 : qc->state; | 1184 : qc->state; |
1178 | 1185 |