summaryrefslogtreecommitdiffstats
path: root/build/external/patches/quicly_0.0.5-vpp/0002-quicly-rtt-time-skew.patch
blob: 589d8cde1256c7cdd983dde3fbf31eb1fe24b268 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
diff --git a/lib/quicly.c b/lib/quicly.c
index 95d5f13..3f4fd18 100644
--- a/lib/quicly.c
+++ b/lib/quicly.c
@@ -351,7 +351,10 @@ static __thread int64_t now;
 
 static void update_now(quicly_context_t *ctx)
 {
-    now = ctx->now->cb(ctx->now);
+  int64_t newval = ctx->now->cb(ctx->now);
+
+  if (now < newval)
+    now = newval;
 }
 
 /**