From: Sergey Kandaurov Date: Thu, 1 Oct 2020 11:10:37 +0000 (+0100) Subject: QUIC: a bandaid for calculating ack_delay with non-monotonic time. X-Git-Url: http://git.kaiwu.me/postgresql/log/contrib/postgres_fdw/static/gitweb.js?a=commitdiff_plain;h=ee4a6024cc0097d8ab29af8441172846de6b0f64;p=nginx.git QUIC: a bandaid for calculating ack_delay with non-monotonic time. --- diff --git a/src/event/ngx_event_quic.c b/src/event/ngx_event_quic.c index f223f5d7f..ed7922909 100644 --- a/src/event/ngx_event_quic.c +++ b/src/event/ngx_event_quic.c @@ -2265,6 +2265,7 @@ ngx_quic_ack_delay(ngx_connection_t *c, struct timeval *received, 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; }