You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by al...@apache.org on 2020/12/04 08:18:23 UTC
[dubbo-go] branch develop updated: fix panic error
This is an automated email from the ASF dual-hosted git repository.
alexstocks pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/dubbo-go.git
The following commit(s) were added to refs/heads/develop by this push:
new ee35594 fix panic error
new 7efba16 Merge pull request #907 from wenxuwan/fix_panic_906
ee35594 is described below
commit ee355947676f4c432966a8197bb48341fb1375aa
Author: wangwx <wa...@tuya.com>
AuthorDate: Thu Dec 3 20:54:40 2020 +0800
fix panic error
---
registry/zookeeper/registry.go | 3 +++
1 file changed, 3 insertions(+)
diff --git a/registry/zookeeper/registry.go b/registry/zookeeper/registry.go
index e8ee51b..58ba7f5 100644
--- a/registry/zookeeper/registry.go
+++ b/registry/zookeeper/registry.go
@@ -212,6 +212,9 @@ func (r *zkRegistry) registerTempZookeeperNode(root string, node string) error {
r.cltLock.Lock()
defer r.cltLock.Unlock()
+ if r.client == nil{
+ return perrors.WithStack(perrors.New("zk client already been closed"))
+ }
err = r.client.Create(root)
if err != nil {
logger.Errorf("zk.Create(root{%s}) = err{%v}", root, perrors.WithStack(err))