diff --git a/internal/pool/pool.go b/internal/pool/pool.go index 36f69537..a8d8276a 100644 --- a/internal/pool/pool.go +++ b/internal/pool/pool.go @@ -93,6 +93,7 @@ func NewConnPool(opt *Options) *ConnPool { idleConns: make([]*Conn, 0, opt.PoolSize), closedCh: make(chan struct{}), } + p.connsMu.Lock() p.checkMinIdleConns() p.connsMu.Unlock()