Mercurial > hg > nginx-quic
comparison src/event/ngx_event_quic.c @ 7777:6aceb85c5bed quic
Fixed excessive push timer firing.
The timer is set when an output frame is generated; there is no need to arm
it after it was fired.
author | Vladimir Homutov <vl@nginx.com> |
---|---|
date | Thu, 02 Apr 2020 14:53:01 +0300 |
parents | 7ea2c68735f9 |
children | 053fa468b044 |
comparison
equal
deleted
inserted
replaced
7776:7ac890c18f5e | 7777:6aceb85c5bed |
---|---|
1762 | 1762 |
1763 static void | 1763 static void |
1764 ngx_quic_push_handler(ngx_event_t *ev) | 1764 ngx_quic_push_handler(ngx_event_t *ev) |
1765 { | 1765 { |
1766 ngx_connection_t *c; | 1766 ngx_connection_t *c; |
1767 ngx_quic_connection_t *qc; | |
1768 | 1767 |
1769 ngx_log_debug0(NGX_LOG_DEBUG_EVENT, ev->log, 0, "push timer"); | 1768 ngx_log_debug0(NGX_LOG_DEBUG_EVENT, ev->log, 0, "push timer"); |
1770 | 1769 |
1771 c = ev->data; | 1770 c = ev->data; |
1772 qc = c->quic; | |
1773 | 1771 |
1774 if (ngx_quic_output(c) != NGX_OK) { | 1772 if (ngx_quic_output(c) != NGX_OK) { |
1775 ngx_quic_close_connection(c); | 1773 ngx_quic_close_connection(c); |
1776 return; | 1774 return; |
1777 } | 1775 } |
1778 | |
1779 ngx_add_timer(&qc->push, qc->tp.max_ack_delay); | |
1780 } | 1776 } |
1781 | 1777 |
1782 | 1778 |
1783 static ngx_int_t | 1779 static ngx_int_t |
1784 ngx_quic_retransmit_ns(ngx_connection_t *c, ngx_quic_namespace_t *ns, | 1780 ngx_quic_retransmit_ns(ngx_connection_t *c, ngx_quic_namespace_t *ns, |