Merge pull request #2087 from brenuart/gh1534
React on ContextClosedEvent only if from "our" context
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user