More updates to port tests

This commit is contained in:
James Agnew 2019-03-17 17:51:54 -04:00
parent 8818a2479c
commit 50a8d2fbc8
1 changed files with 2 additions and 3 deletions

View File

@ -133,8 +133,7 @@ public class PortUtil {
* way to do this, but it seems to help...
*/
for (int i = 0; i < 10; i++) {
try {
Socket client = new Socket();
try (Socket client = new Socket()) {
client.setReuseAddress(true);
client.connect(new InetSocketAddress(nextCandidatePort), 1000);
ourLog.info("Socket still seems open");
@ -145,7 +144,7 @@ public class PortUtil {
}
try {
Thread.sleep(100);
Thread.sleep(250);
} catch (InterruptedException theE) {
// ignore
}