Merge pull request #124 from go-redis/fix/ring-pool-timeout

ring: ignore pool timeout when pinging shards.
This commit is contained in:
Vladimir Mihailenco 2015-06-16 12:27:51 +03:00
commit d36559f9ce
1 changed files with 1 additions and 1 deletions

View File

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