From c667f8186649da6143b14e2f50cbd753d7a78ea0 Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Thu, 10 May 2018 09:41:57 -0600 Subject: [PATCH] telemetry: Use int64 constant for duration interval Otherwise it overflows int type on 32-bit builds --- telemetry/telemetry.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telemetry/telemetry.go b/telemetry/telemetry.go index 0f3ace7f..59ab75be 100644 --- a/telemetry/telemetry.go +++ b/telemetry/telemetry.go @@ -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