Skip to content

Commit

Permalink
Merge pull request redis#74 from go-redis/fix/cluster-redirects
Browse files Browse the repository at this point in the history
Fixed redirects logic - 'max' means less that or equals to
  • Loading branch information
vmihailenco committed Mar 21, 2015
2 parents f8b9d62 + e662309 commit 2dc0bd1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2dc0bd1

Please sign in to comment.