mirror of https://github.com/grpc/grpc-go.git
xds/cdsbalancer: move xds client close to run() (#4273)
Otherwise client may be used by run() after closed.
This commit is contained in:
parent
95173a53fe
commit
967933baf5
|
@ -391,6 +391,7 @@ func (b *cdsBalancer) run() {
|
|||
b.edsLB.Close()
|
||||
b.edsLB = nil
|
||||
}
|
||||
b.xdsClient.Close()
|
||||
// This is the *ONLY* point of return from this function.
|
||||
b.logger.Infof("Shutdown")
|
||||
return
|
||||
|
@ -493,7 +494,6 @@ func (b *cdsBalancer) UpdateSubConnState(sc balancer.SubConn, state balancer.Sub
|
|||
// Close closes the cdsBalancer and the underlying edsBalancer.
|
||||
func (b *cdsBalancer) Close() {
|
||||
b.closed.Fire()
|
||||
b.xdsClient.Close()
|
||||
}
|
||||
|
||||
// ccWrapper wraps the balancer.ClientConn passed to the CDS balancer at
|
||||
|
|
Loading…
Reference in New Issue