Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
FGadvancer committed Oct 27, 2023
2 parents 9608e88 + ad22819 commit 485866f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions discoveryregistry/discovery_register.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,5 @@ type SvcDiscoveryRegistry interface {
CreateRpcRootNodes(serviceNames []string) error
RegisterConf2Registry(key string, conf []byte) error
GetConfFromRegistry(key string) ([]byte, error)
Close()
}
4 changes: 2 additions & 2 deletions discoveryregistry/zookeeper/zk.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ func NewClient(zkServers []string, zkRoot string, options ...ZkOption) (*ZkClien
client.eventChan = eventChan
client.conn = conn
if err := client.ensureRoot(); err != nil {
client.CloseZK()
client.Close()
return nil, err
}
resolver.Register(client)
Expand All @@ -147,7 +147,7 @@ func NewClient(zkServers []string, zkRoot string, options ...ZkOption) (*ZkClien
return client, nil
}

func (s *ZkClient) CloseZK() {
func (s *ZkClient) Close() {
s.logger.Printf("close zk called")
s.cancel()
s.ticker.Stop()
Expand Down

0 comments on commit 485866f

Please sign in to comment.