aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVladimir Homutov <vl@nginx.com>2020-09-21 13:58:17 +0300
committerVladimir Homutov <vl@nginx.com>2020-09-21 13:58:17 +0300
commit766fc16f55301bc37bf5403c9ef48661234b0108 (patch)
tree37740c6acf52c404c6ce516171c23991dfee6339 /src
parentbe719bbec8a9130223e25c4c22b52a73c44eb1ec (diff)
downloadnginx-766fc16f55301bc37bf5403c9ef48661234b0108.tar.gz
nginx-766fc16f55301bc37bf5403c9ef48661234b0108.zip
QUIC: prevented posted push event while in the draining state.
If the push event was posted before ngx_quic_close_connection(), it could send data in the draining state.
Diffstat (limited to 'src')
-rw-r--r--src/event/ngx_event_quic.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/event/ngx_event_quic.c b/src/event/ngx_event_quic.c
index 9301aa9a6..a5f85ee08 100644
--- a/src/event/ngx_event_quic.c
+++ b/src/event/ngx_event_quic.c
@@ -1492,8 +1492,16 @@ ngx_quic_close_quic(ngx_connection_t *c, ngx_int_t rc)
return NGX_AGAIN;
}
- if (qc->close.timer_set) {
- return NGX_AGAIN;
+ if (qc->push.timer_set) {
+ ngx_del_timer(&qc->push);
+ }
+
+ if (qc->pto.timer_set) {
+ ngx_del_timer(&qc->pto);
+ }
+
+ if (qc->push.posted) {
+ ngx_delete_posted_event(&qc->push);
}
for (i = 0; i < NGX_QUIC_ENCRYPTION_LAST; i++) {
@@ -1505,16 +1513,8 @@ ngx_quic_close_quic(ngx_connection_t *c, ngx_int_t rc)
ngx_quic_free_frames(c, &qc->send_ctx[i].sent);
}
- if (qc->push.timer_set) {
- ngx_del_timer(&qc->push);
- }
-
- if (qc->pto.timer_set) {
- ngx_del_timer(&qc->pto);
- }
-
- if (qc->push.posted) {
- ngx_delete_posted_event(&qc->push);
+ if (qc->close.timer_set) {
+ return NGX_AGAIN;
}
ngx_log_debug0(NGX_LOG_DEBUG_EVENT, c->log, 0,