Skip to content

Commit b954bcd

Browse files
committed
[java] shutdown the process of a failed driver server start
1 parent b258204 commit b954bcd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,8 +222,7 @@ public void start() throws IOException {
222222
? StartOrDie.PROCESS_DIED
223223
: StartOrDie.PROCESS_IS_ACTIVE;
224224
} catch (InterruptedException ex) {
225-
process.shutdown();
226-
return null;
225+
return null;
227226
}
228227
},
229228
executorService);
@@ -246,6 +245,7 @@ public void start() throws IOException {
246245
process = null;
247246
throw new WebDriverException("Driver server process died prematurely.");
248247
case PROCESS_IS_ACTIVE:
248+
process.shutdown();
249249
throw new WebDriverException("Timed out waiting for driver server to bind the port.");
250250
}
251251
} catch (ExecutionException e) {

0 commit comments

Comments
 (0)