From e662309bf45a39b30b93b94186f8e46d7a0eacd9 Mon Sep 17 00:00:00 2001 From: Dimitrij Denissenko Date: Thu, 19 Mar 2015 11:40:18 +0000 Subject: [PATCH] Fixed redirects logic - 'max' means less that or equals to --- cluster.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cluster.go b/cluster.go index e5e1475..86d0d5a 100644 --- a/cluster.go +++ b/cluster.go @@ -86,7 +86,7 @@ func (c *ClusterClient) process(cmd Cmder) { tried := make(map[string]struct{}, len(c.addrs)) addr := c.getMasterAddrBySlot(hashSlot) - for attempt := 0; attempt < c.opt.getMaxRedirects(); attempt++ { + for attempt := 0; attempt <= c.opt.getMaxRedirects(); attempt++ { tried[addr] = struct{}{} // Pick the connection, process request