Skip to content

Commit 08ae3da

Browse files
committed
fix pool initialization after config applying
1 parent bca3d92 commit 08ae3da

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

connection.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -443,10 +443,6 @@ func connect(ctx context.Context, c *connection) error {
443443
onDone(err)
444444
}()
445445

446-
if c.pool == nil {
447-
c.pool = conn.NewPool(c.config)
448-
}
449-
450446
if c.userInfo != nil {
451447
c.config = c.config.With(config.WithCredentials(
452448
credentials.NewStaticCredentials(
@@ -457,6 +453,10 @@ func connect(ctx context.Context, c *connection) error {
457453
))
458454
}
459455

456+
if c.pool == nil {
457+
c.pool = conn.NewPool(c.config)
458+
}
459+
460460
c.balancer, err = balancer.New(ctx,
461461
c.config, c.pool,
462462
append(

0 commit comments

Comments
 (0)