Skip to content

Commit 5d58b8e

Browse files
committed
Use a single executor service for DriverService and DriverCommandExecutor
1 parent 23ece4f commit 5d58b8e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
public class DriverCommandExecutor extends HttpCommandExecutor implements Closeable {
4848

4949
private final DriverService service;
50-
private final ExecutorService executorService = Executors.newFixedThreadPool(2, r -> {
50+
private static final ExecutorService executorService = Executors.newFixedThreadPool(2, r -> {
5151
Thread thread = new Thread(r);
5252
thread.setName("Driver Command Executor");
5353
thread.setDaemon(true);

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
*/
6161
public class DriverService implements Closeable {
6262
protected static final Duration DEFAULT_TIMEOUT = Duration.ofSeconds(20);
63-
private final ExecutorService executorService = Executors.newFixedThreadPool(2, r -> {
63+
private static final ExecutorService executorService = Executors.newFixedThreadPool(2, r -> {
6464
Thread thread = new Thread(r);
6565
thread.setName("Driver Service Executor");
6666
thread.setDaemon(true);

0 commit comments

Comments
 (0)