[nginx] QUIC: simplified setting close timer when closing connection.
Roman Arutyunyan
arut at nginx.com
Fri Sep 22 15:36:37 UTC 2023
details: https://hg.nginx.org/nginx/rev/f9845e4b5c14
branches:
changeset: 9162:f9845e4b5c14
user: Roman Arutyunyan <arut at nginx.com>
date: Thu Sep 14 14:15:20 2023 +0400
description:
QUIC: simplified setting close timer when closing connection.
Previously, the timer was never reset due to an explicit check. The check was
added in 36b59521a41c as part of connection close simplification. The reason
was to retain the earliest timeout. However, the timeouts are all the same
while QUIC handshake is in progress and resetting the timer for the same value
has no performance implications. After handshake completion there's only
application level. The change removes the check.
diffstat:
src/event/quic/ngx_event_quic.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diffs (12 lines):
diff -r 4939fd04737f -r f9845e4b5c14 src/event/quic/ngx_event_quic.c
--- a/src/event/quic/ngx_event_quic.c Thu Sep 14 14:13:43 2023 +0400
+++ b/src/event/quic/ngx_event_quic.c Thu Sep 14 14:15:20 2023 +0400
@@ -537,7 +537,7 @@ ngx_quic_close_connection(ngx_connection
qc->error_level = ctx->level;
(void) ngx_quic_send_cc(c);
- if (rc == NGX_OK && !qc->close.timer_set) {
+ if (rc == NGX_OK) {
ngx_add_timer(&qc->close, 3 * ngx_quic_pto(c, ctx));
}
}
More information about the nginx-devel
mailing list