mirror of
https://github.com/boldsuck/haveno.git
synced 2025-01-03 14:49:25 +00:00
fix connection to custom node on startup #945
This commit is contained in:
parent
1150d929af
commit
9cd28a6bde
1 changed files with 5 additions and 2 deletions
|
@ -459,8 +459,11 @@ public final class XmrConnectionService {
|
|||
}
|
||||
|
||||
// restore last connection
|
||||
if (connectionList.getCurrentConnectionUri().isPresent() && connectionManager.hasConnection(connectionList.getCurrentConnectionUri().get())) {
|
||||
if (!HavenoUtils.isLocalHost(connectionList.getCurrentConnectionUri().get()) || !xmrLocalNode.shouldBeIgnored()) {
|
||||
if (isFixedConnection()) {
|
||||
if (getConnections().size() != 1) throw new IllegalStateException("Expected connection list to have 1 fixed connection but was: " + getConnections().size());
|
||||
connectionManager.setConnection(getConnections().get(0));
|
||||
} else if (connectionList.getCurrentConnectionUri().isPresent() && connectionManager.hasConnection(connectionList.getCurrentConnectionUri().get())) {
|
||||
if (!xmrLocalNode.shouldBeIgnored() || !xmrLocalNode.equalsUri(connectionList.getCurrentConnectionUri().get())) {
|
||||
connectionManager.setConnection(connectionList.getCurrentConnectionUri().get());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue