瀏覽代碼

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 7 年之前
父節點
當前提交
6bdac5e861
共有 1 個文件被更改,包括 1 次插入 和 2 次删除
  1. 1 2
      control.go

+ 1 - 2
control.go

@@ -172,8 +172,7 @@ func (c *controlConn) shuffleDial(endpoints []*HostInfo) (*Conn, error) {
 	var err error
 	var err error
 	for _, host := range shuffled {
 	for _, host := range shuffled {
 		var conn *Conn
 		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 {
 		if err == nil {
 			return conn, nil
 			return conn, nil
 		}
 		}