Skip to content

Commit

Permalink
[java] limit the join
Browse files Browse the repository at this point in the history
  • Loading branch information
joerg1985 committed Jan 10, 2024
1 parent 9905e7b commit 3fd70c4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions java/src/org/openqa/selenium/os/ExternalProcess.java
Original file line number Diff line number Diff line change
Expand Up @@ -295,8 +295,8 @@ public void shutdown(Duration timeout) {

try {
if (process.waitFor(timeout.toMillis(), MILLISECONDS)) {
worker.join();
return;
worker.join(8000);
worker.interrupt();
}
} catch (InterruptedException ex) {
Thread.interrupted();
Expand All @@ -305,7 +305,8 @@ public void shutdown(Duration timeout) {

process.destroyForcibly();
try {
worker.join();
worker.join(8000);
worker.interrupt();
} catch (InterruptedException ex) {
Thread.interrupted();
}
Expand Down

0 comments on commit 3fd70c4

Please sign in to comment.