Skip to content

Commit

Permalink
fix panic: sync: negative WaitGroup counter
Browse files Browse the repository at this point in the history
  • Loading branch information
zengfanwei committed Apr 2, 2021
1 parent 50042b9 commit 856e5ab
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions registry/zookeeper/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 856e5ab

Please sign in to comment.