From 3cab22bb8768cf7a5a9535642d71084c5a2ddce1 Mon Sep 17 00:00:00 2001 From: hujiebin Date: Tue, 21 Mar 2023 16:40:29 +0800 Subject: [PATCH] =?UTF-8?q?panic=20=E4=BF=9D=E6=8A=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rpc/user_center.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rpc/user_center.go b/rpc/user_center.go index 05d3592..118f312 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() { -- 2.22.0