comparison src/event/quic/ngx_event_quic.c @ 9162:f9845e4b5c14

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.
author Roman Arutyunyan <arut@nginx.com>
date Thu, 14 Sep 2023 14:15:20 +0400
parents dd5fd5719027
children ff98ae7d261e
comparison
equal deleted inserted replaced
9161:4939fd04737f 9162:f9845e4b5c14
535 } 535 }
536 536
537 qc->error_level = ctx->level; 537 qc->error_level = ctx->level;
538 (void) ngx_quic_send_cc(c); 538 (void) ngx_quic_send_cc(c);
539 539
540 if (rc == NGX_OK && !qc->close.timer_set) { 540 if (rc == NGX_OK) {
541 ngx_add_timer(&qc->close, 3 * ngx_quic_pto(c, ctx)); 541 ngx_add_timer(&qc->close, 3 * ngx_quic_pto(c, ctx));
542 } 542 }
543 } 543 }
544 } 544 }
545 545