all: use math/rand/v2 more
Updates #11058 Signed-off-by: Maisem Ali <maisem@tailscale.com>
This commit is contained in:
@@ -136,6 +136,7 @@ func (c *Conn) pickDERPFallback() int {
|
||||
return pickDERPFallbackForTests()
|
||||
}
|
||||
|
||||
// TODO: use math/rand/v2 here.
|
||||
h := fnv.New64()
|
||||
fmt.Fprintf(h, "%p/%d", c, processStartUnixNano) // arbitrary
|
||||
return ids[rand.New(rand.NewSource(int64(h.Sum64()))).Intn(len(ids))]
|
||||
|
||||
Reference in New Issue
Block a user