Skip to content

Commit 76ee74e

Browse files
committed
fix check pool exhausted
1 parent 5a5d911 commit 76ee74e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/pool/pool.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ func (p *ConnPool) NewConn(ctx context.Context) (*Conn, error) {
165165

166166
func (p *ConnPool) newConn(ctx context.Context, pooled bool) (*Conn, error) {
167167
p.connsMu.Lock()
168-
if p.cfg.PoolSizeStrict && len(p.conns) >= p.poolSize {
168+
if p.cfg.PoolSizeStrict && len(p.conns) >= p.cfg.PoolSize {
169169
p.connsMu.Unlock()
170170
return nil, ErrPoolExhausted
171171
}

0 commit comments

Comments
 (0)