We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4673c62 commit 2b8023cCopy full SHA for 2b8023c
internal/pool/pool.go
@@ -159,18 +159,9 @@ type ConnPool struct {
159
var _ Pooler = (*ConnPool)(nil)
160
161
func NewConnPool(opt *Options) *ConnPool {
162
- semSize := opt.PoolSize
163
- if opt.MaxActiveConns > 0 && opt.MaxActiveConns < opt.PoolSize {
164
- if opt.MaxActiveConns < opt.PoolSize {
165
- opt.MaxActiveConns = opt.PoolSize
166
- }
167
- semSize = opt.MaxActiveConns
168
169
- //semSize = opt.PoolSize
170
-
171
p := &ConnPool{
172
cfg: opt,
173
- semaphore: internal.NewFastSemaphore(semSize),
+ semaphore: internal.NewFastSemaphore(opt.PoolSize),
174
queue: make(chan struct{}, opt.PoolSize),
175
conns: make(map[uint64]*Conn),
176
dialsInProgress: make(chan struct{}, opt.MaxConcurrentDials),
0 commit comments