mirror of
https://github.com/haveno-dex/haveno.git
synced 2024-12-25 07:19:30 -05:00
resolve NPE on shutdown before account opened
This commit is contained in:
parent
716f62797d
commit
d87c679f4c
@ -104,10 +104,14 @@ public class HavenoHeadlessApp implements HeadlessApp {
|
||||
public void stop() {
|
||||
if (!shutDownRequested) {
|
||||
UserThread.runAfter(() -> {
|
||||
gracefulShutDownHandler.gracefulShutDown(() -> {
|
||||
log.debug("App shutdown complete");
|
||||
if (onGracefulShutDownHandler != null) onGracefulShutDownHandler.run();
|
||||
});
|
||||
if (gracefulShutDownHandler != null) {
|
||||
gracefulShutDownHandler.gracefulShutDown(() -> {
|
||||
log.debug("App shutdown complete");
|
||||
if (onGracefulShutDownHandler != null) onGracefulShutDownHandler.run();
|
||||
});
|
||||
} else if (onGracefulShutDownHandler != null) {
|
||||
onGracefulShutDownHandler.run();
|
||||
}
|
||||
}, 200, TimeUnit.MILLISECONDS);
|
||||
shutDownRequested = true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user