mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2025-02-23 14:40:40 +01:00
PeerGroup.triggerConnectionsJob: Code cleanup.
This commit is contained in:
parent
6c944f4142
commit
52804fc8ce
1 changed files with 5 additions and 7 deletions
|
@ -463,8 +463,6 @@ public class PeerGroup implements TransactionBroadcaster {
|
|||
discoverySuccess = discoverPeers() > 0;
|
||||
}
|
||||
|
||||
long retryTime;
|
||||
PeerAddress addrToTry;
|
||||
lock.lock();
|
||||
try {
|
||||
if (doDiscovery) {
|
||||
|
@ -488,12 +486,12 @@ public class PeerGroup implements TransactionBroadcaster {
|
|||
// were given a fixed set of addresses in some test scenario.
|
||||
}
|
||||
return;
|
||||
} else {
|
||||
do {
|
||||
addrToTry = inactives.poll();
|
||||
} while (ipv6Unreachable && addrToTry.getAddr() instanceof Inet6Address);
|
||||
retryTime = backoffMap.get(addrToTry).getRetryTime();
|
||||
}
|
||||
PeerAddress addrToTry;
|
||||
do {
|
||||
addrToTry = inactives.poll();
|
||||
} while (ipv6Unreachable && addrToTry.getAddr() instanceof Inet6Address);
|
||||
long retryTime = backoffMap.get(addrToTry).getRetryTime();
|
||||
retryTime = Math.max(retryTime, groupBackoff.getRetryTime());
|
||||
if (retryTime > now) {
|
||||
long delay = retryTime - now;
|
||||
|
|
Loading…
Add table
Reference in a new issue