mirror of
https://github.com/status-im/consul.git
synced 2025-01-11 06:16:08 +00:00
Prefer rand.Int31n() over rand.Int31().
This commit is contained in:
parent
112f3fd468
commit
223f605b1e
@ -241,7 +241,7 @@ func (s *Server) forwardDC(method, dc string, args interface{}, reply interface{
|
||||
}
|
||||
|
||||
// Select a random addr
|
||||
offset := rand.Int31() % int32(len(servers))
|
||||
offset := rand.Int31n(int32(len(servers)))
|
||||
server := servers[offset]
|
||||
s.remoteLock.RUnlock()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user