Browse Source

pkg/srv: fix error checks from resolveTCPAddr

So that 'terr' can be returned later.

Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
Gyu-Ho Lee 8 years ago
parent
commit
3505c254e1
1 changed files with 1 additions and 1 deletions
  1. 1 1
      pkg/srv/srv.go

+ 1 - 1
pkg/srv/srv.go

@@ -55,7 +55,7 @@ func GetCluster(service, name, dns string, apurls types.URLs) ([]string, error)
 			host := net.JoinHostPort(srv.Target, port)
 			tcpAddr, terr := resolveTCPAddr("tcp", host)
 			if terr != nil {
-				terr = err
+				err = terr
 				continue
 			}
 			n := ""