From: Vladimir Homutov Date: Wed, 15 Apr 2020 10:09:39 +0000 (+0300) Subject: Free remaining frames on connection close. X-Git-Tag: release-1.25.0~4^2~773 X-Git-Url: http://git.kaiwu.me/postgresql/log/contrib/postgres_fdw/static/gitweb.js?a=commitdiff_plain;h=001b81af88c5f67b789142cd07ba3f08e9f91102;p=nginx.git Free remaining frames on connection close. Frames can still float in the following queues: - crypto frames reordering queues (one per encryption level) - moved crypto frames cleanup to the moment where all streams are closed - stream frames reordering queues (one per packet number namespace) - frames retransmit queues (one per packet number namespace) --- diff --git a/src/event/ngx_event_quic.c b/src/event/ngx_event_quic.c index 42a29e342..a85c14934 100644 --- a/src/event/ngx_event_quic.c +++ b/src/event/ngx_event_quic.c @@ -750,10 +750,6 @@ ngx_quic_close_connection(ngx_connection_t *c) if (qc) { - for (i = 0; i < NGX_QUIC_ENCRYPTION_LAST; i++) { - ngx_quic_free_frames(c, &qc->crypto[i].frames); - } - qc->closing = 1; tree = &qc->streams.tree; @@ -793,6 +789,15 @@ ngx_quic_close_connection(ngx_connection_t *c) return; } + for (i = 0; i < NGX_QUIC_ENCRYPTION_LAST; i++) { + ngx_quic_free_frames(c, &qc->crypto[i].frames); + } + + 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); + } + if (qc->push.timer_set) { ngx_del_timer(&qc->push); }