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:
parent
7aa9f352f8
commit
32158bcef2
@ -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,
|
||||
})
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user