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

Add releaseConnStrict

This commit is contained in:
Vladimir Mihailenco
2018-10-14 11:27:34 +03:00
parent 77f7b88603
commit fa76dd0e87
4 changed files with 17 additions and 25 deletions

View File

@ -614,11 +614,7 @@ 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)
return
}
shard.Client.connPool.Remove(cn)
shard.Client.releaseConnStrict(cn, err)
if canRetry && internal.IsRetryableError(err, true) {
mu.Lock()