Mercurial > hg > nginx
comparison src/event/quic/ngx_event_quic_output.c @ 9001:868e1b76c956 quic
QUIC: do not arm loss detection timer if nothing was sent.
Notably, this became quite practicable after the recent fix in cd8018bc81a5.
Additionally, do not arm loss detection timer on connection termination.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Wed, 02 Feb 2022 15:57:08 +0300 |
parents | cd8018bc81a5 |
children | 5f78174d1ac1 |
comparison
equal
deleted
inserted
replaced
9000:cd8018bc81a5 | 9001:868e1b76c956 |
---|---|
102 | 102 |
103 if (rc != NGX_OK) { | 103 if (rc != NGX_OK) { |
104 return NGX_ERROR; | 104 return NGX_ERROR; |
105 } | 105 } |
106 | 106 |
107 if (in_flight != cg->in_flight && !qc->send_timer_set && !qc->closing) { | 107 if (in_flight == cg->in_flight || qc->closing) { |
108 /* no ack-eliciting data was sent or we are done */ | |
109 return NGX_OK; | |
110 } | |
111 | |
112 if (!qc->send_timer_set) { | |
108 qc->send_timer_set = 1; | 113 qc->send_timer_set = 1; |
109 ngx_add_timer(c->read, qc->tp.max_idle_timeout); | 114 ngx_add_timer(c->read, qc->tp.max_idle_timeout); |
110 } | 115 } |
111 | 116 |
112 ngx_quic_set_lost_timer(c); | 117 ngx_quic_set_lost_timer(c); |