1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-28 06:42:00 +03:00

Cleanup pool

This commit is contained in:
Vladimir Mihailenco
2018-05-28 17:27:24 +03:00
parent 0f9028adf0
commit faf5666fbd
12 changed files with 219 additions and 207 deletions

View File

@ -525,7 +525,7 @@ func (c *Ring) defaultProcessPipeline(cmds []Cmder) error {
continue
}
cn, _, err := shard.Client.getConn()
cn, err := shard.Client.getConn()
if err != nil {
setCmdsErr(cmds, err)
continue
@ -533,10 +533,10 @@ func (c *Ring) defaultProcessPipeline(cmds []Cmder) error {
canRetry, err := shard.Client.pipelineProcessCmds(cn, cmds)
if err == nil || internal.IsRedisError(err) {
_ = shard.Client.connPool.Put(cn)
shard.Client.connPool.Put(cn)
continue
}
_ = shard.Client.connPool.Remove(cn)
shard.Client.connPool.Remove(cn)
if canRetry && internal.IsRetryableError(err, true) {
if failedCmdsMap == nil {