fix(nacos): call unsubscribe when watching is stopped (#1697)

pull/1700/head
包子 3 years ago committed by GitHub
parent 7aa9f352f8
commit 32158bcef2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      contrib/registry/nacos/watcher.go

@ -78,6 +78,9 @@ func (w *watcher) Next() ([]*registry.ServiceInstance, error) {
func (w *watcher) Stop() error { func (w *watcher) Stop() error {
w.cancel() w.cancel()
// close return w.cli.Unsubscribe(&vo.SubscribeParam{
return nil ServiceName: w.serviceName,
GroupName: w.groupName,
Clusters: w.clusters,
})
} }

Loading…
Cancel
Save