From 2b8023cb1757b4b29edb05ce258a9190c921e7c0 Mon Sep 17 00:00:00 2001 From: Nedyalko Dyakov Date: Wed, 5 Nov 2025 22:03:49 +0200 Subject: [PATCH] use pool size for semsize --- internal/pool/pool.go | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/internal/pool/pool.go b/internal/pool/pool.go index f67dca8e..95c409f2 100644 --- a/internal/pool/pool.go +++ b/internal/pool/pool.go @@ -159,18 +159,9 @@ type ConnPool struct { var _ Pooler = (*ConnPool)(nil) func NewConnPool(opt *Options) *ConnPool { - semSize := opt.PoolSize - if opt.MaxActiveConns > 0 && opt.MaxActiveConns < opt.PoolSize { - if opt.MaxActiveConns < opt.PoolSize { - opt.MaxActiveConns = opt.PoolSize - } - semSize = opt.MaxActiveConns - } - //semSize = opt.PoolSize - p := &ConnPool{ cfg: opt, - semaphore: internal.NewFastSemaphore(semSize), + semaphore: internal.NewFastSemaphore(opt.PoolSize), queue: make(chan struct{}, opt.PoolSize), conns: make(map[uint64]*Conn), dialsInProgress: make(chan struct{}, opt.MaxConcurrentDials),