From f409fcf8f113d31f4279b52d212cef7d518dacd4 Mon Sep 17 00:00:00 2001 From: Daniel Rocha Date: Fri, 8 Mar 2019 13:04:52 +0100 Subject: [PATCH] Fail if server time changes --- htp.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/htp.go b/htp.go index 4169ae8..33d8bbc 100644 --- a/htp.go +++ b/htp.go @@ -64,6 +64,10 @@ func main() { lo = max(lo, t0-t2-Second) hi = min(hi, t1-t2) + if hi < lo { + logger.Fatal("Server time changed during syncronization") + } + offset = (hi + lo) / 2 if !*quiet { margin := (hi - lo) / 2