Skip to content

Commit

Permalink
Added a small delay to verify that the port has been closed
Browse files Browse the repository at this point in the history
  • Loading branch information
Raul committed Sep 4, 2024
1 parent 0b9a258 commit a408a28
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,14 @@ public void stop() throws IOException {
if (serverSocket != null) {
serverSocket.close();
}

while (!serverSocket.isClosed()) {
try {
Thread.sleep(1);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
}
}

public String getHost() {
Expand Down

0 comments on commit a408a28

Please sign in to comment.