This is an automated email from the ASF dual-hosted git repository.

alexstocks pushed a commit to branch 3.0
in repository https://gitbox.apache.org/repos/asf/dubbo-go.git


The following commit(s) were added to refs/heads/3.0 by this push:
     new 856e5ab  fix panic: sync: negative WaitGroup counter
     new 9635a6a  Merge pull request #1129 from jack15083/1.5
856e5ab is described below

commit 856e5ab8bec16a2a2d0e11eac1a23186eecc0d5f
Author: zengfanwei <[email protected]>
AuthorDate: Fri Apr 2 20:38:25 2021 +0800

    fix panic: sync: negative WaitGroup counter
---
 registry/zookeeper/registry.go | 1 +
 1 file changed, 1 insertion(+)

diff --git a/registry/zookeeper/registry.go b/registry/zookeeper/registry.go
index 8b21aae..f67f984 100644
--- a/registry/zookeeper/registry.go
+++ b/registry/zookeeper/registry.go
@@ -79,6 +79,7 @@ func newZkRegistry(url *common.URL) (registry.Registry, 
error) {
                return nil, err
        }
 
+       r.WaitGroup().Add(1) //zk client start successful, then wg +1
        go zookeeper.HandleClientRestart(r)
 
        r.listener = zookeeper.NewZkEventListener(r.client)

Reply via email to