comparison src/event/ngx_event_quic.c @ 8245:49efd27dace6 quic

QUIC: use client max_ack_delay when computing pto timeout. Previously, server max_ack_delay was used which is wrong. Also, level check is simplified.
author Roman Arutyunyan <arut@nginx.com>
date Wed, 09 Dec 2020 16:15:24 +0000
parents 6201cef77b1d
children b9ac4752d0e6
comparison
equal deleted inserted replaced
8244:6201cef77b1d 8245:49efd27dace6
3421 3421
3422 if (qc->congestion.in_flight == 0) { /* no in-flight packets */ 3422 if (qc->congestion.in_flight == 0) { /* no in-flight packets */
3423 return duration; 3423 return duration;
3424 } 3424 }
3425 3425
3426 if (ctx == &qc->send_ctx[2] && c->ssl->handshaked) { 3426 if (ctx->level == ssl_encryption_application && c->ssl->handshaked) {
3427 /* application send space */ 3427 duration += qc->ctp.max_ack_delay << qc->pto_count;
3428
3429 duration += qc->tp.max_ack_delay << qc->pto_count;
3430 } 3428 }
3431 3429
3432 return duration; 3430 return duration;
3433 } 3431 }
3434 3432