Commit 69eaa27c by Justin Walsh

Mark an instance as DOWN when the application context is stopped.

Fixes gh-377
parent 440779bc
...@@ -148,10 +148,10 @@ public class EurekaDiscoveryClientConfiguration implements SmartLifecycle, Order ...@@ -148,10 +148,10 @@ public class EurekaDiscoveryClientConfiguration implements SmartLifecycle, Order
@Override @Override
public void stop() { public void stop() {
log.info("Unregistering application " + this.instanceConfig.getAppname() log.info("Unregistering application " + this.instanceConfig.getAppname()
+ " with eureka with status OUT_OF_SERVICE"); + " with eureka with status DOWN");
if (ApplicationInfoManager.getInstance().getInfo() != null) { if (ApplicationInfoManager.getInstance().getInfo() != null) {
ApplicationInfoManager.getInstance().setInstanceStatus( ApplicationInfoManager.getInstance().setInstanceStatus(
InstanceStatus.OUT_OF_SERVICE); InstanceStatus.DOWN);
} }
this.running.set(false); this.running.set(false);
} }
......
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