Prefer rand.Int31n() over rand.Int31().

This commit is contained in:
Sean Chittenden 2016-06-20 15:26:27 -07:00
parent 112f3fd468
commit 223f605b1e
No known key found for this signature in database
GPG Key ID: 4EBC9DC16C2E5E16

View File

@ -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()