From f8d9c827eaeb306ca0ac88f0b2876b264592b9af Mon Sep 17 00:00:00 2001 From: woodser Date: Tue, 2 Jan 2024 11:15:46 -0500 Subject: [PATCH] skip wallet initialization if shut down started --- .../java/haveno/core/xmr/wallet/XmrWalletService.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/core/src/main/java/haveno/core/xmr/wallet/XmrWalletService.java b/core/src/main/java/haveno/core/xmr/wallet/XmrWalletService.java index 0311c88b..f68432f5 100644 --- a/core/src/main/java/haveno/core/xmr/wallet/XmrWalletService.java +++ b/core/src/main/java/haveno/core/xmr/wallet/XmrWalletService.java @@ -164,19 +164,19 @@ public class XmrWalletService { @Override public void onAccountCreated() { - log.info(getClass().getSimpleName() + ".accountService.onAccountCreated()"); + log.info("onAccountCreated()"); initialize(); } @Override public void onAccountOpened() { - log.info(getClass().getSimpleName() + ".accountService.onAccountOpened()"); + log.info("onAccountOpened()"); initialize(); } @Override public void onAccountClosed() { - log.info(getClass().getSimpleName() + ".accountService.onAccountClosed()"); + log.info("onAccountClosed()"); closeMainWallet(true); } @@ -760,6 +760,7 @@ public class XmrWalletService { private void maybeInitMainWallet(boolean sync, int numAttempts) { synchronized (walletLock) { + if (isShutDownStarted) return; // open or create wallet main wallet if (wallet == null) { @@ -774,7 +775,7 @@ public class XmrWalletService { } // sync wallet and register listener - if (wallet != null) { + if (wallet != null && !isShutDownStarted) { log.info("Monero wallet uri={}, path={}", wallet.getRpcConnection().getUri(), wallet.getPath()); // sync main wallet if applicable