mirror of
https://github.com/redis/go-redis.git
synced 2025-07-28 06:42:00 +03:00
v2: Remove timed out connection from the pool.
This commit is contained in:
@ -119,10 +119,10 @@ func (c *baseClient) run(req Req) {
|
||||
|
||||
val, err := req.ParseReply(cn.Rd)
|
||||
if err != nil {
|
||||
if _, ok := err.(*parserError); ok {
|
||||
c.removeConn(cn)
|
||||
} else {
|
||||
if err == Nil {
|
||||
c.putConn(cn)
|
||||
} else {
|
||||
c.removeConn(cn)
|
||||
}
|
||||
req.SetErr(err)
|
||||
return
|
||||
|
Reference in New Issue
Block a user