Browse Source

Removing redundant connection + dependant goroutines (#1278)

* Removing redundant connection + dependant goroutines

Fixes #1273

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

* Keep dial instead of connect

Signed-off-by: Alex Lourie <djay.il@gmail.com>
Alex Lourie 6 years ago
parent
commit
6bdac5e861
1 changed files with 1 additions and 2 deletions
  1. 1 2
      control.go

+ 1 - 2
control.go

@@ -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
 		}