Skip to content

Commit 5f3f7d0

Browse files
committed
[grid] ensure we do not close HttpClients waiting for responses
1 parent 8add578 commit 5f3f7d0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

java/src/org/openqa/selenium/grid/router/HandleSession.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,9 @@ class HandleSession implements HttpHandler {
7373

7474
this.httpClients =
7575
CacheBuilder.newBuilder()
76-
.expireAfterAccess(Duration.ofMinutes(1))
76+
// this timeout must be bigger than default connection + read timeout, to ensure we do
77+
// not close HttpClients which might have requests waiting for responses
78+
.expireAfterAccess(Duration.ofMinutes(4))
7779
.removalListener(
7880
(RemovalListener<URL, HttpClient>) removal -> removal.getValue().close())
7981
.build();

0 commit comments

Comments
 (0)