Skip to content

Commit 5557c74

Browse files
author
Runze Cui
committed
Discard the usage of MaxActiveConns
1 parent cd47349 commit 5557c74

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

internal/pool/pool_dynamic.go

-7
Original file line numberDiff line numberDiff line change
@@ -109,13 +109,6 @@ func (p *DynamicConnPool) Get(ctx context.Context) (*Conn, error) {
109109
return nil, ctx.Err()
110110
}
111111

112-
p.connsMu.Lock()
113-
if p.cfg.MaxActiveConns > 0 && p.poolSize >= p.cfg.MaxActiveConns {
114-
p.connsMu.Unlock()
115-
return nil, ErrPoolExhausted
116-
}
117-
p.connsMu.Unlock()
118-
119112
cn, err := p.getFromIdlePool()
120113
if cn != nil || err != nil {
121114
return cn, err

0 commit comments

Comments
 (0)