Skip to content

Commit

Permalink
Remove rank.Seed().
Browse files Browse the repository at this point in the history
  • Loading branch information
sunquakes committed Aug 22, 2024
1 parent 0907ebb commit 54174b2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions client/ribbon.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import (
)

func GetAddress(addressList []string) string {
rand.Seed(time.Now().UnixNano())
key := rand.Intn(len(addressList))
source := rand.NewSource(time.Now().UnixNano())
r := rand.New(source)
key := r.Intn(len(addressList))
return addressList[key]
}

0 comments on commit 54174b2

Please sign in to comment.