do not force restart main wallet on connection change with same config

This commit is contained in:
woodser 2025-04-23 12:23:53 -04:00 committed by woodser
parent bd9c28fafa
commit 8611593a3f

View File

@ -1367,11 +1367,16 @@ public class XmrWalletService extends XmrWalletBase {
}, THREAD_ID);
} else {
// force restart main wallet if connection changed while syncing
if (wallet != null) {
log.warn("Force restarting main wallet because connection changed while syncing");
forceRestartMainWallet();
// check if ignored
if (wallet == null || isShutDownStarted) return;
if (HavenoUtils.connectionConfigsEqual(connection, wallet.getDaemonConnection())) {
updatePollPeriod();
return;
}
// force restart main wallet if connection changed while syncing
log.warn("Force restarting main wallet because connection changed while syncing");
forceRestartMainWallet();
}
});