From e6eeeda3d8dc13c9efcbd086ba57968bb6b7369d Mon Sep 17 00:00:00 2001 From: WANG QIANG Date: Tue, 8 Jan 2019 17:15:59 +0800 Subject: [PATCH] Remove unnecessary error check --- cluster.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/cluster.go b/cluster.go index 5c1e0933..f283722c 100644 --- a/cluster.go +++ b/cluster.go @@ -359,9 +359,7 @@ func (c *clusterNodes) GetOrCreate(addr string) (*clusterNode, error) { node = newClusterNode(c.opt, addr) c.allAddrs = appendIfNotExists(c.allAddrs, addr) - if err == nil { - c.clusterAddrs = append(c.clusterAddrs, addr) - } + c.clusterAddrs = append(c.clusterAddrs, addr) c.allNodes[addr] = node return node, err