3
0
mirror of https://github.com/Qortal/altcoinj.git synced 2025-02-12 02:05:53 +00:00

Don't bother pointless attempt to construct thread pool with no open circuits.

This commit is contained in:
Adam Mackler 2014-09-07 06:50:38 -04:00 committed by Mike Hearn
parent 56603ff1f9
commit a3073a0017

View File

@ -128,6 +128,9 @@ public class TorDiscovery implements PeerDiscovery {
try {
List<Circuit> circuits = getCircuits(timeoutValue, timeoutUnit, routers);
if (circuits.isEmpty())
throw new PeerDiscoveryException("Failed to open any circuit within " +
String.valueOf(timeoutValue) + " " + timeoutUnit);
Collection<InetSocketAddress> addresses = lookupAddresses(timeoutValue, timeoutUnit, circuits);