1
0
mirror of https://github.com/go-kratos/kratos.git synced 2025-02-15 13:53:35 +02:00

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

This commit is contained in:
包子 2021-12-17 11:08:16 +08:00 committed by GitHub
parent 7aa9f352f8
commit 32158bcef2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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