forked from mirror/redis
Merge pull request #74 from go-redis/fix/cluster-redirects
Fixed redirects logic - 'max' means less that or equals to
This commit is contained in:
commit
2dc0bd1c0a
|
@ -86,7 +86,7 @@ func (c *ClusterClient) process(cmd Cmder) {
|
||||||
|
|
||||||
tried := make(map[string]struct{}, len(c.addrs))
|
tried := make(map[string]struct{}, len(c.addrs))
|
||||||
addr := c.getMasterAddrBySlot(hashSlot)
|
addr := c.getMasterAddrBySlot(hashSlot)
|
||||||
for attempt := 0; attempt < c.opt.getMaxRedirects(); attempt++ {
|
for attempt := 0; attempt <= c.opt.getMaxRedirects(); attempt++ {
|
||||||
tried[addr] = struct{}{}
|
tried[addr] = struct{}{}
|
||||||
|
|
||||||
// Pick the connection, process request
|
// Pick the connection, process request
|
||||||
|
|
Loading…
Reference in New Issue