Skip to content

Commit

Permalink
Fixed redirects logic - 'max' means less that or equals to
Browse files Browse the repository at this point in the history
  • Loading branch information
dim committed Mar 19, 2015
1 parent f8b9d62 commit e662309
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 e662309

Please sign in to comment.