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 năm trước cách đây
mục cha
commit
6bdac5e861
1 tập tin đã thay đổi với 1 bổ sung2 xóa
  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
 		}