aboutsummaryrefslogtreecommitdiff
path: root/src/event/quic/ngx_event_quic.c
diff options
context:
space:
mode:
authorSergey Kandaurov <pluknet@nginx.com>2021-02-03 12:39:41 +0300
committerSergey Kandaurov <pluknet@nginx.com>2021-02-03 12:39:41 +0300
commitb51d0100299d0a2f35edfc1c00b3e31571bc88e5 (patch)
treeb8aa84cc9ab8375b8b7b9f6bc5e5ef43d9d243f2 /src/event/quic/ngx_event_quic.c
parent365c8b7914033c05fc1e564684dade448fc65671 (diff)
downloadnginx-b51d0100299d0a2f35edfc1c00b3e31571bc88e5.tar.gz
nginx-b51d0100299d0a2f35edfc1c00b3e31571bc88e5.zip
QUIC: removed redundant "app" flag from ngx_quic_close_frame_t.
The flag was introduced to create type-aware CONNECTION_CLOSE frames, and now is replaced with frame type information, directly accessible. Notably, this fixes type logging for received frames in b3d9e57d0f62.
Diffstat (limited to 'src/event/quic/ngx_event_quic.c')
-rw-r--r--src/event/quic/ngx_event_quic.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/event/quic/ngx_event_quic.c b/src/event/quic/ngx_event_quic.c
index 6a156bb71..b0628545d 100644
--- a/src/event/quic/ngx_event_quic.c
+++ b/src/event/quic/ngx_event_quic.c
@@ -522,7 +522,8 @@ ngx_quic_log_frame(ngx_log_t *log, ngx_quic_frame_t *f, ngx_uint_t tx)
case NGX_QUIC_FT_CONNECTION_CLOSE:
case NGX_QUIC_FT_CONNECTION_CLOSE_APP:
p = ngx_slprintf(p, last, "CONNECTION_CLOSE%s err:%ui",
- f->u.close.app ? "_APP" : "", f->u.close.error_code);
+ f->type == NGX_QUIC_FT_CONNECTION_CLOSE ? "" : "_APP",
+ f->u.close.error_code);
if (f->u.close.reason.len) {
p = ngx_slprintf(p, last, " %V", &f->u.close.reason);
@@ -3251,10 +3252,10 @@ ngx_quic_send_cc(ngx_connection_t *c)
}
frame->level = qc->error_level;
- frame->type = NGX_QUIC_FT_CONNECTION_CLOSE;
+ frame->type = qc->error_app ? NGX_QUIC_FT_CONNECTION_CLOSE_APP
+ : NGX_QUIC_FT_CONNECTION_CLOSE;
frame->u.close.error_code = qc->error;
frame->u.close.frame_type = qc->error_ftype;
- frame->u.close.app = qc->error_app;
if (qc->error_reason) {
frame->u.close.reason.len = ngx_strlen(qc->error_reason);