Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,8 @@ public static String getPortNumber(String fullName, String simpleName) {
while (p == null) {
int pn = portNum++;
try (ServerSocket sock = new ServerSocket(pn)) {
// Enable SO_REUSEADDR to allow faster port reuse after socket closure
sock.setReuseAddress(true);
//make sure the port can be opened. Something MIGHT be running on it.
p = Integer.toString(pn);
LOG.fine("Setting port for " + fullName + " to " + p);
Expand Down
Loading