mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-07-26 00:15:18 -04:00
Increase timer delay
This commit is contained in:
parent
a4b959df22
commit
38afa428ba
1 changed files with 9 additions and 6 deletions
|
@ -407,17 +407,19 @@ public class PeerGroup implements MessageListener, ConnectionListener {
|
||||||
connectToSeedNodeTimer = UserThread.runAfterRandomDelay(() -> {
|
connectToSeedNodeTimer = UserThread.runAfterRandomDelay(() -> {
|
||||||
connectToSeedNode();
|
connectToSeedNode();
|
||||||
startConnectToSeedNodeTimer();
|
startConnectToSeedNodeTimer();
|
||||||
}, 1, 2, TimeUnit.MINUTES);
|
}, 10, 12, TimeUnit.MINUTES);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void connectToSeedNode() {
|
private void connectToSeedNode() {
|
||||||
// remove enough connections first
|
// remove enough connections first
|
||||||
|
if (getMyAddress() != null) {
|
||||||
checkIfConnectedPeersExceeds(MAX_CONNECTIONS_NORMAL_PRIORITY - 3);
|
checkIfConnectedPeersExceeds(MAX_CONNECTIONS_NORMAL_PRIORITY - 3);
|
||||||
UserThread.runAfter(() -> {
|
UserThread.runAfter(() -> {
|
||||||
resetRemainingSeedNodes();
|
resetRemainingSeedNodes();
|
||||||
authenticateToRemainingSeedNode();
|
authenticateToRemainingSeedNode();
|
||||||
}, 500, TimeUnit.MILLISECONDS);
|
}, 500, TimeUnit.MILLISECONDS);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -792,6 +794,7 @@ public class PeerGroup implements MessageListener, ConnectionListener {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Nullable
|
||||||
Address getMyAddress() {
|
Address getMyAddress() {
|
||||||
return networkNode.getAddress();
|
return networkNode.getAddress();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue