Skip to content

Commit 7a63077

Browse files
authored
Close DriverService and DriverCommandExecutor executor on quit. Fixes #9666
* Close DriverService executor on quit * Close DriverCommandExecutor executor on quit
1 parent 9e6eaf9 commit 7a63077

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

java/client/src/org/openqa/selenium/remote/service/DriverCommandExecutor.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,8 @@ public Response execute(Command command) throws IOException {
130130
} catch (InterruptedException e) {
131131
Thread.currentThread().interrupt();
132132
throw new WebDriverException("Timed out waiting for driver server to stop.", e);
133+
} finally {
134+
executorService.shutdownNow();
133135
}
134136

135137
} else {

java/client/src/org/openqa/selenium/remote/service/DriverService.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,7 @@ public void stop() {
286286
} finally {
287287
process = null;
288288
lock.unlock();
289+
executorService.shutdownNow();
289290
}
290291

291292
if (toThrow != null) {

0 commit comments

Comments
 (0)