Skip to content

Commit

Permalink
Merge pull request #648 from pantianying/develop-fix-zk-noevent
Browse files Browse the repository at this point in the history
Develop fix zk no provider bug
  • Loading branch information
hxmhlt authored Jul 9, 2020
2 parents 5bee5b6 + b5a67e3 commit 81026a3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion common/rpc_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ func (sm *serviceMap) UnRegister(interfaceName, protocol, serviceId string) erro
}
}
delete(svcs, serviceId)
if len(sm.serviceMap) == 0 {
if len(sm.serviceMap[protocol]) == 0 {
delete(sm.serviceMap, protocol)
}

Expand Down
2 changes: 1 addition & 1 deletion remoting/zookeeper/listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ func (l *ZkEventListener) listenDirEvent(conf *common.URL, zkPath string, listen
// Only need to compare Path when subscribing to provider
if strings.LastIndex(zkPath, constant.PROVIDER_CATEGORY) != -1 {
provider, _ := common.NewURL(c)
if provider.Path != conf.Path {
if provider.ServiceKey() != conf.ServiceKey() {
continue
}
}
Expand Down

0 comments on commit 81026a3

Please sign in to comment.