1
0
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:
Vladimir Mihailenco
2013-09-17 10:35:52 +03:00
parent dc90e359e9
commit 73b92efa94
3 changed files with 18 additions and 25 deletions

View File

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