From 76ee74e944565f9fd6f2a5416b0f4e7a2e4bae23 Mon Sep 17 00:00:00 2001 From: Nikolay Vorobev Date: Fri, 17 Nov 2023 01:29:50 +0300 Subject: [PATCH] fix check pool exhausted --- internal/pool/pool.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/pool/pool.go b/internal/pool/pool.go index 37a7ff75..7cf96fb6 100644 --- a/internal/pool/pool.go +++ b/internal/pool/pool.go @@ -165,7 +165,7 @@ func (p *ConnPool) NewConn(ctx context.Context) (*Conn, error) { func (p *ConnPool) newConn(ctx context.Context, pooled bool) (*Conn, error) { p.connsMu.Lock() - if p.cfg.PoolSizeStrict && len(p.conns) >= p.poolSize { + if p.cfg.PoolSizeStrict && len(p.conns) >= p.cfg.PoolSize { p.connsMu.Unlock() return nil, ErrPoolExhausted }