Mercurial > hg > nginx-quic
comparison src/event/ngx_event_quic.c @ 8053:4e3a71621c9a quic
QUIC: do not arm loss detection timer for succeeding packets.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Wed, 19 Aug 2020 13:24:47 +0300 |
parents | 52c88f41d24c |
children | 355e079c5eee |
comparison
equal
deleted
inserted
replaced
8052:52c88f41d24c | 8053:4e3a71621c9a |
---|---|
3779 | 3779 |
3780 for (i = 0; i < NGX_QUIC_SEND_CTX_LAST; i++) { | 3780 for (i = 0; i < NGX_QUIC_SEND_CTX_LAST; i++) { |
3781 | 3781 |
3782 ctx = &qc->send_ctx[i]; | 3782 ctx = &qc->send_ctx[i]; |
3783 | 3783 |
3784 if (ctx->largest_ack == (uint64_t) -1) { | |
3785 continue; | |
3786 } | |
3787 | |
3784 while (!ngx_queue_empty(&ctx->sent)) { | 3788 while (!ngx_queue_empty(&ctx->sent)) { |
3785 | 3789 |
3786 q = ngx_queue_head(&ctx->sent); | 3790 q = ngx_queue_head(&ctx->sent); |
3787 start = ngx_queue_data(q, ngx_quic_frame_t, queue); | 3791 start = ngx_queue_data(q, ngx_quic_frame_t, queue); |
3792 | |
3793 if (start->pnum > ctx->largest_ack) { | |
3794 break; | |
3795 } | |
3788 | 3796 |
3789 wait = start->last + thr - now; | 3797 wait = start->last + thr - now; |
3790 | 3798 |
3791 ngx_log_debug4(NGX_LOG_DEBUG_EVENT, c->log, 0, | 3799 ngx_log_debug4(NGX_LOG_DEBUG_EVENT, c->log, 0, |
3792 "quic detect_lost pnum:%ui thr:%M wait:%i level:%d", | 3800 "quic detect_lost pnum:%ui thr:%M wait:%i level:%d", |
3796 | 3804 |
3797 if (min_wait == 0 || wait < min_wait) { | 3805 if (min_wait == 0 || wait < min_wait) { |
3798 min_wait = wait; | 3806 min_wait = wait; |
3799 } | 3807 } |
3800 | 3808 |
3801 if ((start->pnum > ctx->largest_ack) | 3809 if (ctx->largest_ack - start->pnum < NGX_QUIC_PKT_THR) { |
3802 || ctx->largest_ack == (uint64_t) -1 | |
3803 || ((ctx->largest_ack - start->pnum) < NGX_QUIC_PKT_THR)) | |
3804 { | |
3805 break; | 3810 break; |
3806 } | 3811 } |
3807 } | 3812 } |
3808 | 3813 |
3809 if (ngx_quic_resend_frames(c, ctx, start) != NGX_OK) { | 3814 if (ngx_quic_resend_frames(c, ctx, start) != NGX_OK) { |