mirror of
https://github.com/retoaccess1/haveno-reto.git
synced 2024-11-10 13:13:36 +01: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