PeerGroup.triggerConnectionsJob: Code cleanup.
@@ -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 {
+ }
+ PeerAddress addrToTry;
do {
addrToTry = inactives.poll();
} while (ipv6Unreachable && addrToTry.getAddr() instanceof Inet6Address);
- retryTime = backoffMap.get(addrToTry).getRetryTime();
- }
+ long retryTime = backoffMap.get(addrToTry).getRetryTime();
retryTime = Math.max(retryTime, groupBackoff.getRetryTime());
if (retryTime > now) {
long delay = retryTime - now;
