Skip to content
Snippets Groups Projects
Commit af915209 authored by kezhan's avatar kezhan
Browse files

fix:nacos service provider does not require subscribe

parent 45b36d99
No related branches found
No related tags found
No related merge requests found
......@@ -172,6 +172,11 @@ func (nr *nacosRegistry) subscribe(conf *common.URL) (registry.Listener, error)
// subscribe from registry
func (nr *nacosRegistry) Subscribe(url *common.URL, notifyListener registry.NotifyListener) error {
role, _ := strconv.Atoi(nr.URL.GetParam(constant.ROLE_KEY, ""))
if role != common.CONSUMER {
return nil
}
for {
if !nr.IsAvailable() {
logger.Warnf("event listener game over.")
......
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