Skip to content

Commit 389343c

Browse files
Egor.GorlinEgor.Gorlin
Egor.Gorlin
authored and
Egor.Gorlin
committed
Fix random connection opening strategy
1 parent 1de3d05 commit 389343c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

connect.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func dial(secure, skipVerify bool, hosts []string, readTimeout, writeTimeout tim
4444
case connOpenInOrder:
4545
num = i
4646
case connOpenRandom:
47-
num = (ident + 1) % len(hosts)
47+
num = (ident + i) % len(hosts)
4848
}
4949
switch {
5050
case secure:

0 commit comments

Comments
 (0)