mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-01-03 09:29:44 +00:00
resolve NPE on shutdown before account opened
This commit is contained in:
parent
716f62797d
commit
d87c679f4c
1 changed files with 8 additions and 4 deletions
|
@ -104,10 +104,14 @@ public class HavenoHeadlessApp implements HeadlessApp {
|
||||||
public void stop() {
|
public void stop() {
|
||||||
if (!shutDownRequested) {
|
if (!shutDownRequested) {
|
||||||
UserThread.runAfter(() -> {
|
UserThread.runAfter(() -> {
|
||||||
gracefulShutDownHandler.gracefulShutDown(() -> {
|
if (gracefulShutDownHandler != null) {
|
||||||
log.debug("App shutdown complete");
|
gracefulShutDownHandler.gracefulShutDown(() -> {
|
||||||
if (onGracefulShutDownHandler != null) onGracefulShutDownHandler.run();
|
log.debug("App shutdown complete");
|
||||||
});
|
if (onGracefulShutDownHandler != null) onGracefulShutDownHandler.run();
|
||||||
|
});
|
||||||
|
} else if (onGracefulShutDownHandler != null) {
|
||||||
|
onGracefulShutDownHandler.run();
|
||||||
|
}
|
||||||
}, 200, TimeUnit.MILLISECONDS);
|
}, 200, TimeUnit.MILLISECONDS);
|
||||||
shutDownRequested = true;
|
shutDownRequested = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue