Skip to content

Commit

Permalink
Removing redundant connection + dependant goroutines (apache#1278)
Browse files Browse the repository at this point in the history
* Removing redundant connection + dependant goroutines

Fixes apache#1273

Signed-off-by: Alex Lourie <djay.il@gmail.com>

* Keep dial instead of connect

Signed-off-by: Alex Lourie <djay.il@gmail.com>
  • Loading branch information
alourie authored and Zariel committed Mar 19, 2019
1 parent 59996b5 commit 6bdac5e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions control.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,7 @@ func (c *controlConn) shuffleDial(endpoints []*HostInfo) (*Conn, error) {
var err error
for _, host := range shuffled {
var conn *Conn
c.session.dial(host, &cfg, c)
conn, err = c.session.connect(host, c)
conn, err = c.session.dial(host, &cfg, c)
if err == nil {
return conn, nil
}
Expand Down

0 comments on commit 6bdac5e

Please sign in to comment.