Skip to content

Commit

Permalink
cache wallet info last on poll
Browse files Browse the repository at this point in the history
  • Loading branch information
woodser committed Jul 13, 2024
1 parent a149d92 commit 23a7fb3
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions core/src/main/java/haveno/core/xmr/wallet/XmrWalletService.java
Original file line number Diff line number Diff line change
Expand Up @@ -1845,9 +1845,6 @@ private void doPollWallet(boolean updateTxs) {
}
}
}

// cache wallet info
cacheWalletInfo();
} catch (Exception e) {
if (wallet == null || isShutDownStarted) return;
boolean isConnectionRefused = e.getMessage() != null && e.getMessage().contains("Connection refused");
Expand All @@ -1857,6 +1854,15 @@ else if (isWalletConnectedToDaemon()) {
//e.printStackTrace();
}
} finally {

// cache wallet info last
if (wallet != null && !isShutDownStarted) {
try {
cacheWalletInfo();
} catch (Exception e) {
e.printStackTrace();
}
}
pollInProgress = false;
}
}
Expand Down

0 comments on commit 23a7fb3

Please sign in to comment.