diff --git a/rpc/user_center.go b/rpc/user_center.go index 05d3592d0bd23b78aa86ff3d21db160346444465..118f31236f0773f67c8b93c988329996e18c725b 100644 --- a/rpc/user_center.go +++ b/rpc/user_center.go @@ -67,7 +67,9 @@ func (b *Builder) UpdateState(addrs []string) { for i, s := range addrs { as[i] = resolver.Address{Addr: s} } - b.cc.UpdateState(resolver.State{Addresses: as}) + if b.cc != nil { + _ = b.cc.UpdateState(resolver.State{Addresses: as}) + } } func init() {