forked from mirror/redis
Fix conn management in PubSub
This commit is contained in:
parent
9abfbff156
commit
59d94967b6
|
@ -46,7 +46,7 @@ func (c *PubSub) conn() (*pool.Conn, bool, error) {
|
||||||
|
|
||||||
if !cn.Inited {
|
if !cn.Inited {
|
||||||
if err := c.base.initConn(cn); err != nil {
|
if err := c.base.initConn(cn); err != nil {
|
||||||
_ = c.base.connPool.Remove(cn)
|
_ = c.base.connPool.CloseConn(cn)
|
||||||
return nil, false, err
|
return nil, false, err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue