switch to current connection on connection changed

This commit is contained in:
woodser 2024-07-19 08:47:33 -04:00
parent 9b26682646
commit 291622e452
2 changed files with 8 additions and 0 deletions

View file

@ -2323,6 +2323,9 @@ public abstract class Trade implements Tradable, Model {
private void onConnectionChanged(MoneroRpcConnection connection) {
synchronized (walletLock) {
// use current connection
connection = xmrConnectionService.getConnection();
// check if ignored
if (isShutDownStarted) return;
if (getWallet() == null) return;

View file

@ -1660,6 +1660,11 @@ public class XmrWalletService {
private void onConnectionChanged(MoneroRpcConnection connection) {
synchronized (WALLET_LOCK) {
// use current connection
connection = xmrConnectionService.getConnection();
// check if ignored
if (wallet == null || isShutDownStarted) return;
if (HavenoUtils.connectionConfigsEqual(connection, wallet.getDaemonConnection())) return;
String oldProxyUri = wallet == null || wallet.getDaemonConnection() == null ? null : wallet.getDaemonConnection().getProxyUri();