Merge pull request from go-redis/fix/cluster-redirects

Fixed redirects logic - 'max' means less that or equals to
This commit is contained in:
Vladimir Mihailenco 2015-03-21 13:45:27 +02:00
commit 2dc0bd1c0a
1 changed files with 1 additions and 1 deletions

View File

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