mirror of
https://github.com/boldsuck/haveno.git
synced 2025-01-08 17:19:29 +00:00
skip wallet initialization if shut down started
This commit is contained in:
parent
2ee2b747f9
commit
f8d9c827ea
1 changed files with 5 additions and 4 deletions
|
@ -164,19 +164,19 @@ public class XmrWalletService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onAccountCreated() {
|
public void onAccountCreated() {
|
||||||
log.info(getClass().getSimpleName() + ".accountService.onAccountCreated()");
|
log.info("onAccountCreated()");
|
||||||
initialize();
|
initialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onAccountOpened() {
|
public void onAccountOpened() {
|
||||||
log.info(getClass().getSimpleName() + ".accountService.onAccountOpened()");
|
log.info("onAccountOpened()");
|
||||||
initialize();
|
initialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onAccountClosed() {
|
public void onAccountClosed() {
|
||||||
log.info(getClass().getSimpleName() + ".accountService.onAccountClosed()");
|
log.info("onAccountClosed()");
|
||||||
closeMainWallet(true);
|
closeMainWallet(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -760,6 +760,7 @@ public class XmrWalletService {
|
||||||
|
|
||||||
private void maybeInitMainWallet(boolean sync, int numAttempts) {
|
private void maybeInitMainWallet(boolean sync, int numAttempts) {
|
||||||
synchronized (walletLock) {
|
synchronized (walletLock) {
|
||||||
|
if (isShutDownStarted) return;
|
||||||
|
|
||||||
// open or create wallet main wallet
|
// open or create wallet main wallet
|
||||||
if (wallet == null) {
|
if (wallet == null) {
|
||||||
|
@ -774,7 +775,7 @@ public class XmrWalletService {
|
||||||
}
|
}
|
||||||
|
|
||||||
// sync wallet and register listener
|
// sync wallet and register listener
|
||||||
if (wallet != null) {
|
if (wallet != null && !isShutDownStarted) {
|
||||||
log.info("Monero wallet uri={}, path={}", wallet.getRpcConnection().getUri(), wallet.getPath());
|
log.info("Monero wallet uri={}, path={}", wallet.getRpcConnection().getUri(), wallet.getPath());
|
||||||
|
|
||||||
// sync main wallet if applicable
|
// sync main wallet if applicable
|
||||||
|
|
Loading…
Reference in a new issue