Преглед изворни кода

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