diff options
author | Vladimir Homutov <vl@nginx.com> | 2020-05-18 13:54:35 +0300 |
---|---|---|
committer | Vladimir Homutov <vl@nginx.com> | 2020-05-18 13:54:35 +0300 |
commit | 0041c3f6b72d7e31beca74b0f17d8445e8aaf9e9 (patch) | |
tree | e1ba76fa13635bfcb0ef0d9667561bd1db0312ad /src | |
parent | 92df22200e3901f8ae27f9125026cb9cb3f3ba56 (diff) | |
download | nginx-0041c3f6b72d7e31beca74b0f17d8445e8aaf9e9.tar.gz nginx-0041c3f6b72d7e31beca74b0f17d8445e8aaf9e9.zip |
Fixed frame retransmissions.
It was possible that retransmit timer was not set after the first
retransmission attempt, due to ngx_quic_retransmit() did not set
wait time properly, and the condition in retransmit handler was incorrect.
Diffstat (limited to 'src')
-rw-r--r-- | src/event/ngx_event_quic.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/event/ngx_event_quic.c b/src/event/ngx_event_quic.c index 156dfa51f..31a10f98f 100644 --- a/src/event/ngx_event_quic.c +++ b/src/event/ngx_event_quic.c @@ -3196,7 +3196,7 @@ ngx_quic_retransmit_handler(ngx_event_t *ev) if (i == 0) { wait = nswait; - } else if (nswait > 0 && nswait < wait) { + } else if (nswait > 0 && (wait == 0 || wait > nswait)) { wait = nswait; } } @@ -3289,6 +3289,8 @@ ngx_quic_retransmit(ngx_connection_t *c, ngx_quic_send_ctx_t *ctx, /* move frames group to the end of queue */ ngx_queue_add(&ctx->sent, &range); + wait = qc->tp.max_ack_delay; + } while (q != ngx_queue_sentinel(&ctx->sent)); *waitp = wait; |