forked from StarOpenSource/Engine
Make CrashHandler use Engine#shutdown
This commit is contained in:
parent
e6fa60e287
commit
52e0f67bd2
1 changed files with 3 additions and 2 deletions
|
@ -19,6 +19,7 @@
|
||||||
|
|
||||||
package de.staropensource.sosengine.base.logging;
|
package de.staropensource.sosengine.base.logging;
|
||||||
|
|
||||||
|
import de.staropensource.sosengine.base.Engine;
|
||||||
import de.staropensource.sosengine.base.EngineConfiguration;
|
import de.staropensource.sosengine.base.EngineConfiguration;
|
||||||
import de.staropensource.sosengine.base.classes.Placeholder;
|
import de.staropensource.sosengine.base.classes.Placeholder;
|
||||||
import de.staropensource.sosengine.base.events.EngineCrashEvent;
|
import de.staropensource.sosengine.base.events.EngineCrashEvent;
|
||||||
|
@ -146,11 +147,11 @@ public final class CrashHandler {
|
||||||
// Send EngineCrash event
|
// Send EngineCrash event
|
||||||
new EngineCrashEvent().callEvent();
|
new EngineCrashEvent().callEvent();
|
||||||
|
|
||||||
// Shutdown JVM
|
// Shutdown (engine &) JVM
|
||||||
if (EngineConfiguration.getInstance().isLoggerImmediateShutdown())
|
if (EngineConfiguration.getInstance().isLoggerImmediateShutdown())
|
||||||
Runtime.getRuntime().halt(69);
|
Runtime.getRuntime().halt(69);
|
||||||
else
|
else
|
||||||
Runtime.getRuntime().exit(69);
|
Engine.getInstance().shutdown(69);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue