Merge pull request #2087 from brenuart/gh1534

React on ContextClosedEvent only if from "our" context
This commit is contained in:
Ryan Baxter
2017-07-10 13:33:39 -04:00
committed by GitHub

View File

@@ -122,8 +122,9 @@ public class EurekaAutoServiceRegistration implements AutoServiceRegistration, S
@EventListener(ContextClosedEvent.class)
public void onApplicationEvent(ContextClosedEvent event) {
// register in case meta data changed
stop();
if( event.getApplicationContext() == context ) {
stop();
}
}
}