Skip to content
Snippets Groups Projects
Commit b5a67e36 authored by pantianying's avatar pantianying
Browse files

fix bug for no provider by zookeeper

parent 5bee5b68
No related branches found
No related tags found
No related merge requests found
......@@ -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)
}
......
......@@ -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
}
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment