You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by xi...@apache.org on 2020/07/09 10:31:02 UTC
[dubbo-go] branch develop updated: fix bug for no provider by
zookeeper
This is an automated email from the ASF dual-hosted git repository.
xinminghe 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 b5a67e3 fix bug for no provider by zookeeper
new 81026a3 Merge pull request #648 from pantianying/develop-fix-zk-noevent
b5a67e3 is described below
commit b5a67e368a6a5e762fb378fa07a531773a70e121
Author: pantianying <pa...@gmail.com>
AuthorDate: Thu Jul 9 10:22:31 2020 +0800
fix bug for no provider by zookeeper
---
common/rpc_service.go | 2 +-
remoting/zookeeper/listener.go | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/common/rpc_service.go b/common/rpc_service.go
index 05ca372..f8b8e07 100644
--- a/common/rpc_service.go
+++ b/common/rpc_service.go
@@ -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)
}
diff --git a/remoting/zookeeper/listener.go b/remoting/zookeeper/listener.go
index 1ffea88..948e0d7 100644
--- a/remoting/zookeeper/listener.go
+++ b/remoting/zookeeper/listener.go
@@ -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
}
}