Fix using grpc.WithBalancerName("grpclb") explicitly (#2778) (#2802)

This commit is contained in:
wjywbs 2019-05-10 18:42:49 -04:00 committed by lyuxuan
parent a0be99ad32
commit ab909771a0
1 changed files with 1 additions and 0 deletions

View File

@ -603,6 +603,7 @@ func (cc *ClientConn) updateResolverState(s resolver.State) error {
} else if cc.balancerWrapper == nil {
// Balancer dial option was set, and this is the first time handling
// resolved addresses. Build a balancer with dopts.balancerBuilder.
cc.curBalancerName = cc.dopts.balancerBuilder.Name()
cc.balancerWrapper = newCCBalancerWrapper(cc, cc.dopts.balancerBuilder, cc.balancerBuildOpts)
}