Skip to content

Commit cd65fdd

Browse files
committed
fix panic on TestSessionPoolRacyGet
1 parent 7682668 commit cd65fdd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

internal/table/client.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@ func newClient(
6666
},
6767
done: make(chan struct{}),
6868
}
69-
balancer.OnDiscovery(c.onDiscovery)
69+
if balancer != nil {
70+
balancer.OnDiscovery(c.onDiscovery)
71+
}
7072
if idleThreshold := config.IdleThreshold(); idleThreshold > 0 {
7173
c.spawnedGoroutines.Add(1)
7274
go c.internalPoolGC(ctx, idleThreshold)

0 commit comments

Comments
 (0)