mirror of https://github.com/go-redis/redis.git
Merge pull request #124 from go-redis/fix/ring-pool-timeout
ring: ignore pool timeout when pinging shards.
This commit is contained in:
commit
d36559f9ce
2
ring.go
2
ring.go
|
@ -203,7 +203,7 @@ func (ring *Ring) heartbeat() {
|
||||||
|
|
||||||
for _, shard := range ring.shards {
|
for _, shard := range ring.shards {
|
||||||
err := shard.Client.Ping().Err()
|
err := shard.Client.Ping().Err()
|
||||||
if shard.Vote(err == nil) {
|
if shard.Vote(err == nil || err == errPoolTimeout) {
|
||||||
log.Printf("redis: ring shard state changed: %s", shard)
|
log.Printf("redis: ring shard state changed: %s", shard)
|
||||||
rebalance = true
|
rebalance = true
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue