File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ package smartconnpool
1818
1919import (
2020 "context"
21+ "fmt"
2122 "slices"
2223 "sync"
2324 "sync/atomic"
@@ -510,10 +511,12 @@ func (pool *ConnPool[C]) get(ctx context.Context) (*Pooled[C], error) {
510511 // to other clients, wait until one of the connections is returned
511512 if conn == nil {
512513 start := time .Now ()
514+
515+ oldPool := fmt .Sprintf ("%+v" , pool )
513516 conn , err = pool .wait .waitForConn (ctx , nil )
514517 if err != nil {
515518 log .Errorf ("===================== ERROR: waitForConn err: %s" , err .Error ())
516- log .Errorf ("% +v" , pool )
519+ log .Errorf ("Old pool: \n %s \n ================= \n New pool: \n % +v" , oldPool , pool )
517520 return nil , ErrTimeout
518521 }
519522 pool .recordWait (start )
You can’t perform that action at this time.
0 commit comments