#961 init cluster after instantiate cluster
This commit is contained in:
parent
539280c44b
commit
35edfd4383
@ -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