SocketUtils: Fix the multi port function for 0

https://build.spring.io/browse/INT-B43-47
This commit is contained in:
Artem Bilan
2015-12-28 18:49:27 -05:00
parent 287173bc67
commit f7e04918c5

View File

@@ -94,7 +94,7 @@ public final class SocketUtils {
final List<Integer> openPorts = new ArrayList<Integer>(numberOfRequestedPorts);
for (int i = seed; i < seed + 200; i++) {
for (int i = seed; i < seed + 200; i = i == 0 ? i : i + 1) {
try {
ServerSocket sock = ServerSocketFactory.getDefault()
.createServerSocket(i, 1, InetAddress.getByName("localhost"));