diff --git a/base/src/main/java/de/staropensource/sosengine/base/Engine.java b/base/src/main/java/de/staropensource/sosengine/base/Engine.java index 2d8b944e..13b29139 100644 --- a/base/src/main/java/de/staropensource/sosengine/base/Engine.java +++ b/base/src/main/java/de/staropensource/sosengine/base/Engine.java @@ -72,6 +72,14 @@ public final class Engine implements SubsystemMainClass { @NotNull private LoggerInstance logger; + /** + * Indicates if the engine is shutting down. + * + * @since 1-alpha1 + */ + @Getter + private boolean shuttingDown = false; + /** * Constructor, initializes the StarOpenSource Engine. * @@ -199,6 +207,7 @@ public final class Engine implements SubsystemMainClass { */ public void shutdown(@Range(from = 0, to = 255) int exitCode) { logger.info("Shutting engine down"); + shuttingDown = true; logger.verb("Notifiying classes about shutdown"); new EngineShutdownEvent().callEvent(); logger.verb("Notifying subsystems about shutdown");