diff --git a/pubsub.go b/pubsub.go index 3680323..6393d8a 100644 --- a/pubsub.go +++ b/pubsub.go @@ -46,7 +46,7 @@ func (c *PubSub) conn() (*pool.Conn, bool, error) { if !cn.Inited { if err := c.base.initConn(cn); err != nil { - _ = c.base.connPool.Remove(cn) + _ = c.base.connPool.CloseConn(cn) return nil, false, err } }