File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -592,9 +592,7 @@ func (pool *ConnPool[C]) get(ctx context.Context) (*Pooled[C], error) {
592
592
// to other clients, wait until one of the connections is returned
593
593
if conn == nil {
594
594
start := time .Now ()
595
- conn , err = pool .wait .waitForConn (ctx , nil , func () bool {
596
- return pool .capacity .Load () == 0
597
- })
595
+ conn , err = pool .wait .waitForConn (ctx , nil )
598
596
if err != nil {
599
597
return nil , ErrTimeout
600
598
}
@@ -651,9 +649,7 @@ func (pool *ConnPool[C]) getWithSetting(ctx context.Context, setting *Setting) (
651
649
// wait for one of them
652
650
if conn == nil {
653
651
start := time .Now ()
654
- conn , err = pool .wait .waitForConn (ctx , setting , func () bool {
655
- return pool .capacity .Load () == 0
656
- })
652
+ conn , err = pool .wait .waitForConn (ctx , setting )
657
653
if err != nil {
658
654
return nil , ErrTimeout
659
655
}
You can’t perform that action at this time.
0 commit comments