mirror of
https://github.com/boldsuck/haveno.git
synced 2024-12-22 20:19:21 +00:00
switch to current connection on connection changed
This commit is contained in:
parent
9b26682646
commit
291622e452
2 changed files with 8 additions and 0 deletions
|
@ -2323,6 +2323,9 @@ public abstract class Trade implements Tradable, Model {
|
||||||
private void onConnectionChanged(MoneroRpcConnection connection) {
|
private void onConnectionChanged(MoneroRpcConnection connection) {
|
||||||
synchronized (walletLock) {
|
synchronized (walletLock) {
|
||||||
|
|
||||||
|
// use current connection
|
||||||
|
connection = xmrConnectionService.getConnection();
|
||||||
|
|
||||||
// check if ignored
|
// check if ignored
|
||||||
if (isShutDownStarted) return;
|
if (isShutDownStarted) return;
|
||||||
if (getWallet() == null) return;
|
if (getWallet() == null) return;
|
||||||
|
|
|
@ -1660,6 +1660,11 @@ public class XmrWalletService {
|
||||||
|
|
||||||
private void onConnectionChanged(MoneroRpcConnection connection) {
|
private void onConnectionChanged(MoneroRpcConnection connection) {
|
||||||
synchronized (WALLET_LOCK) {
|
synchronized (WALLET_LOCK) {
|
||||||
|
|
||||||
|
// use current connection
|
||||||
|
connection = xmrConnectionService.getConnection();
|
||||||
|
|
||||||
|
// check if ignored
|
||||||
if (wallet == null || isShutDownStarted) return;
|
if (wallet == null || isShutDownStarted) return;
|
||||||
if (HavenoUtils.connectionConfigsEqual(connection, wallet.getDaemonConnection())) return;
|
if (HavenoUtils.connectionConfigsEqual(connection, wallet.getDaemonConnection())) return;
|
||||||
String oldProxyUri = wallet == null || wallet.getDaemonConnection() == null ? null : wallet.getDaemonConnection().getProxyUri();
|
String oldProxyUri = wallet == null || wallet.getDaemonConnection() == null ? null : wallet.getDaemonConnection().getProxyUri();
|
||||||
|
|
Loading…
Reference in a new issue