Ensure there is only one shutdown hook
The effect of not doing this is not often noticeable, but you sometimes get a race condition between a context and its parent closing in different threads without it.
This commit is contained in:
@@ -141,6 +141,7 @@ public class BootstrapApplicationListener implements
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!installed) {
|
if (!installed) {
|
||||||
|
application.setRegisterShutdownHook(false);
|
||||||
application.addInitializers(new AncestorInitializer(context));
|
application.addInitializers(new AncestorInitializer(context));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user