all: use math/rand/v2 more

Updates #11058

Signed-off-by: Maisem Ali <maisem@tailscale.com>
This commit is contained in:
Maisem Ali
2024-06-05 14:37:31 -07:00
committed by Maisem Ali
parent d2d459d442
commit 4a8cb1d9f3
23 changed files with 43 additions and 66 deletions
@@ -14,7 +14,7 @@ import (
"io"
"log"
"maps"
"math/rand"
"math/rand/v2"
"net/http"
"net/http/httptest"
"net/netip"
@@ -774,7 +774,7 @@ func (s *Server) serveMap(w http.ResponseWriter, r *http.Request, mkey key.Machi
go panic(fmt.Sprintf("bad map request: %v", err))
}
jitter := time.Duration(rand.Intn(8000)) * time.Millisecond
jitter := rand.N(8 * time.Second)
keepAlive := 50*time.Second + jitter
node := s.Node(req.NodeKey)