mirror of
https://github.com/redis/go-redis.git
synced 2025-07-29 17:41:15 +03:00
Retry BadConnError
This commit is contained in:
@ -39,7 +39,7 @@ type Pooler interface {
|
||||
|
||||
Get(context.Context) (*Conn, error)
|
||||
Put(*Conn)
|
||||
Remove(*Conn)
|
||||
Remove(*Conn, error)
|
||||
|
||||
Len() int
|
||||
IdleLen() int
|
||||
@ -311,7 +311,7 @@ func (p *ConnPool) popIdle() *Conn {
|
||||
|
||||
func (p *ConnPool) Put(cn *Conn) {
|
||||
if !cn.pooled {
|
||||
p.Remove(cn)
|
||||
p.Remove(cn, nil)
|
||||
return
|
||||
}
|
||||
|
||||
@ -322,7 +322,7 @@ func (p *ConnPool) Put(cn *Conn) {
|
||||
p.freeTurn()
|
||||
}
|
||||
|
||||
func (p *ConnPool) Remove(cn *Conn) {
|
||||
func (p *ConnPool) Remove(cn *Conn, reason error) {
|
||||
p.removeConnWithLock(cn)
|
||||
p.freeTurn()
|
||||
_ = p.closeConn(cn)
|
||||
|
Reference in New Issue
Block a user