mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-11-30 16:36:36 -05:00
skip connection switch on illegal error syncing wallet
This commit is contained in:
parent
ef0f841f90
commit
d575f384ef
1 changed files with 4 additions and 2 deletions
|
|
@ -2596,7 +2596,7 @@ public abstract class Trade extends XmrWalletBase implements Tradable, Model {
|
|||
MoneroRpcConnection sourceConnection = xmrConnectionService.getConnection();
|
||||
try {
|
||||
synchronized (walletLock) {
|
||||
if (getWallet() == null) throw new RuntimeException("Cannot sync trade wallet because it doesn't exist for " + getClass().getSimpleName() + ", " + getId());
|
||||
if (getWallet() == null) throw new IllegalStateException("Cannot sync trade wallet because it doesn't exist for " + getClass().getSimpleName() + ", " + getId());
|
||||
if (getWallet().getDaemonConnection() == null) throw new RuntimeException("Cannot sync trade wallet because it's not connected to a Monero daemon for " + getClass().getSimpleName() + ", " + getId());
|
||||
if (isWalletBehind()) {
|
||||
log.info("Syncing wallet for {} {}", getClass().getSimpleName(), getShortId());
|
||||
|
|
@ -2616,7 +2616,9 @@ public abstract class Trade extends XmrWalletBase implements Tradable, Model {
|
|||
|
||||
if (pollWallet) doPollWallet();
|
||||
} catch (Exception e) {
|
||||
if (!isShutDownStarted) ThreadUtils.execute(() -> requestSwitchToNextBestConnection(sourceConnection), getId());
|
||||
if (!(e instanceof IllegalStateException) && !isShutDownStarted) {
|
||||
ThreadUtils.execute(() -> requestSwitchToNextBestConnection(sourceConnection), getId());
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue