Merge pull request #1002 from alibaba/hotfix_remove_service_failed
#961 init cluster after instantiate cluster
This commit is contained in:
commit
53d154d6c3
@ -99,7 +99,9 @@ public class Cluster extends com.alibaba.nacos.api.naming.pojo.Cluster implement
|
||||
}
|
||||
|
||||
public void destroy() {
|
||||
checkTask.setCancelled(true);
|
||||
if (checkTask != null) {
|
||||
checkTask.setCancelled(true);
|
||||
}
|
||||
}
|
||||
|
||||
public HealthCheckTask getHealthCheckTask() {
|
||||
|
@ -217,6 +217,7 @@ public class Service extends com.alibaba.nacos.api.naming.pojo.Service implement
|
||||
instance.getClusterName(), instance.toJSON());
|
||||
Cluster cluster = new Cluster(instance.getClusterName());
|
||||
cluster.setService(this);
|
||||
cluster.init();
|
||||
getClusterMap().put(instance.getClusterName(), cluster);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user