Commit f0d8c86b by Spencer Gibb

Only call shutdown() if DiscoveryClient is not null.

fixes spring-cloud-samples/tests/issues/2
parent 76d0c018
......@@ -58,7 +58,9 @@ public class DiscoveryClientConfigServiceAutoConfiguration {
this.lifecycle.stop();
rebind(this.clientConfig, "eurekaClientConfig");
rebind(this.instanceConfig, "eurekaInstanceConfig");
DiscoveryManager.getInstance().getDiscoveryClient().shutdown();
if (DiscoveryManager.getInstance().getDiscoveryClient() != null) {
DiscoveryManager.getInstance().getDiscoveryClient().shutdown();
}
ApplicationInfoManager.getInstance().initComponent(this.instanceConfig);
DiscoveryManager.getInstance().initComponent(this.instanceConfig,
this.clientConfig);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment