]> git.kaiwu.me - nginx.git/commitdiff
QUIC: fixed measuring ACK Delay against 0-RTT packets.
authorSergey Kandaurov <pluknet@nginx.com>
Tue, 6 Oct 2020 17:08:55 +0000 (18:08 +0100)
committerSergey Kandaurov <pluknet@nginx.com>
Tue, 6 Oct 2020 17:08:55 +0000 (18:08 +0100)
src/event/ngx_event_quic.c

index f503c48babdb87c0d4fff5e5de1fed180f28c4eb..c6a249b422f350c7f616be534a2bdd6f7b0ac8e7 100644 (file)
@@ -1841,12 +1841,16 @@ ngx_quic_process_packet(ngx_connection_t *c, ngx_quic_conf_t *conf,
         qc->validated = 1;
     }
 
+    if (pkt->level == ssl_encryption_early_data
+        || pkt->level == ssl_encryption_application)
+    {
+        ngx_gettimeofday(&pkt->received);
+    }
+
     if (pkt->level != ssl_encryption_application) {
         return ngx_quic_payload_handler(c, pkt);
     }
 
-    ngx_gettimeofday(&pkt->received);
-
     /* switch keys on Key Phase change */
 
     if (pkt->key_update) {