From 236c021d4ce13118d2c336058c11768b3bf7cf19 Mon Sep 17 00:00:00 2001 From: yyoshiki41 Date: Thu, 13 Oct 2016 17:27:43 +0900 Subject: [PATCH] simplify if condition --- cluster.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cluster.go b/cluster.go index 876b6d0f..ff935fc4 100644 --- a/cluster.go +++ b/cluster.go @@ -653,7 +653,9 @@ func (c *ClusterClient) execClusterCmds( cmd.reset() failedCmds[nil] = append(failedCmds[nil], cmds[i:]...) break - } else if moved, ask, addr := internal.IsMovedError(err); moved { + } + moved, ask, addr := internal.IsMovedError(err) + if moved { c.lazyReloadSlots() cmd.reset() node, err := c.nodeByAddr(addr)