# HG changeset patch # User Sergey Kandaurov # Date 1601550637 -3600 # Node ID 4983357258d78e4676f42af81f8df312271b70b7 # Parent 9588a2782c62225632d85488303e3e56f8294ea0 QUIC: a bandaid for calculating ack_delay with non-monotonic time. diff -r 9588a2782c62 -r 4983357258d7 src/event/ngx_event_quic.c --- a/src/event/ngx_event_quic.c Thu Oct 01 12:10:22 2020 +0100 +++ b/src/event/ngx_event_quic.c Thu Oct 01 12:10:37 2020 +0100 @@ -2265,6 +2265,7 @@ ngx_gettimeofday(&tv); ack_delay = (tv.tv_sec - received->tv_sec) * 1000000 + tv.tv_usec - received->tv_usec; + ack_delay = ngx_max(ack_delay, 0); ack_delay >>= c->quic->ctp.ack_delay_exponent; }