Skip to content

Commit

Permalink
client: don't record offset when the server returns a RATE KissCode
Browse files Browse the repository at this point in the history
  • Loading branch information
abh committed Aug 13, 2023
1 parent 8d4e4f4 commit d9e8f9d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions client/monitor/monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ func CheckHost(ip *netip.Addr, cfg *pb.Config) (*pb.ServerStatus, *ntp.Response,
// if we get an explicit bad response in any of the samples, we error out
if resp.Stratum == 0 || resp.Stratum == 16 {
if len(resp.KissCode) > 0 {
if resp.KissCode == "RATE" {
status.Offset = nil
}
return status, resp, fmt.Errorf("%s", resp.KissCode)
}

Expand Down

0 comments on commit d9e8f9d

Please sign in to comment.