Commit c667f818 authored by Matthew Holt's avatar Matthew Holt

telemetry: Use int64 constant for duration interval

Otherwise it overflows int type on 32-bit builds
parent b321c00a
......@@ -209,7 +209,7 @@ func emit(final bool) error {
// ensure we won't slam the telemetry server; add a little variance
if reply.NextUpdate < 1*time.Second {
reply.NextUpdate = defaultUpdateInterval + time.Duration(rand.Intn(int(1*time.Minute)))
reply.NextUpdate = defaultUpdateInterval + time.Duration(rand.Int63n(int64(1*time.Minute)))
}
// schedule the next update (if this wasn't the last one and
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment