Skip to content

Commit

Permalink
Remove useless srvs shuffle
Browse files Browse the repository at this point in the history
We have servers shuffle in `github.com/samuel/go-zookeeper/conn.go:191` and `github.com/samuel/go-zookeeper/dnshostprovider.go:53`, so one of them should be removed. The shuffle logic is more proper to keep inside the real connect component, that's why I choose to remove the outside one.
  • Loading branch information
0xkookoo authored and jeffbean committed Apr 28, 2024
1 parent 3ac3132 commit a6fb885
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,6 @@ func Connect(servers []string, sessionTimeout time.Duration, options ...connOpti

srvs := FormatServers(servers)

// Randomize the order of the servers to avoid creating hotspots
stringShuffle(srvs)

ec := make(chan Event, eventChanSize)
conn := &Conn{
dialer: net.DialTimeout,
Expand Down

0 comments on commit a6fb885

Please sign in to comment.