Skip to content

Commit

Permalink
Avoid localhost.
Browse files Browse the repository at this point in the history
  • Loading branch information
raphw committed Jun 17, 2020
1 parent 50f0fa6 commit 2b584f3
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;

import java.io.*;
import java.net.InetAddress;
import java.net.ServerSocket;
import java.net.Socket;
import java.nio.ByteBuffer;
Expand Down Expand Up @@ -1674,7 +1673,7 @@ public static VirtualMachine attach(String processId, int timeout, Dispatcher di
if (target == null) {
throw new IllegalStateException("Could not locate target process info in " + directory);
}
ServerSocket serverSocket = new ServerSocket(0, 50, InetAddress.getLocalHost());
ServerSocket serverSocket = new ServerSocket(0);
try {
serverSocket.setSoTimeout(timeout);
File receiver = new File(directory, target.getProperty("vmId"));
Expand Down

0 comments on commit 2b584f3

Please sign in to comment.