QUIC: do not arm loss detection timer for succeeding packets.

This commit is contained in:
Sergey Kandaurov 2020-08-19 13:24:47 +03:00
parent 3bf7b02e6e
commit 391abc00c9

View File

@ -3781,11 +3781,19 @@ ngx_quic_detect_lost(ngx_connection_t *c)
ctx = &qc->send_ctx[i]; ctx = &qc->send_ctx[i];
if (ctx->largest_ack == (uint64_t) -1) {
continue;
}
while (!ngx_queue_empty(&ctx->sent)) { while (!ngx_queue_empty(&ctx->sent)) {
q = ngx_queue_head(&ctx->sent); q = ngx_queue_head(&ctx->sent);
start = ngx_queue_data(q, ngx_quic_frame_t, queue); start = ngx_queue_data(q, ngx_quic_frame_t, queue);
if (start->pnum > ctx->largest_ack) {
break;
}
wait = start->last + thr - now; wait = start->last + thr - now;
ngx_log_debug4(NGX_LOG_DEBUG_EVENT, c->log, 0, ngx_log_debug4(NGX_LOG_DEBUG_EVENT, c->log, 0,
@ -3798,10 +3806,7 @@ ngx_quic_detect_lost(ngx_connection_t *c)
min_wait = wait; min_wait = wait;
} }
if ((start->pnum > ctx->largest_ack) if (ctx->largest_ack - start->pnum < NGX_QUIC_PKT_THR) {
|| ctx->largest_ack == (uint64_t) -1
|| ((ctx->largest_ack - start->pnum) < NGX_QUIC_PKT_THR))
{
break; break;
} }
} }