diff --git a/p2p/src/main/java/bisq/network/Socks5MultiDiscovery.java b/p2p/src/main/java/bisq/network/Socks5MultiDiscovery.java index 262d1e0c20..214b07ec4e 100644 --- a/p2p/src/main/java/bisq/network/Socks5MultiDiscovery.java +++ b/p2p/src/main/java/bisq/network/Socks5MultiDiscovery.java @@ -75,7 +75,7 @@ public class Socks5MultiDiscovery implements PeerDiscovery { list.addAll(Arrays.asList(discovery.getPeers(services, timeoutValue, timeoutUnit))); } - return list.toArray(new InetSocketAddress[list.size()]); + return list.toArray(new InetSocketAddress[0]); } @Override