Skip to content

Commit

Permalink
Fail if server time changes
Browse files Browse the repository at this point in the history
  • Loading branch information
danroc committed Mar 8, 2019
1 parent 6a49498 commit f409fcf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions htp.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f409fcf

Please # to comment.