Skip to content

Commit 4fff7fc

Browse files
author
Simon Stewart
committed
Bump okhttp client to infinity to match old apache httpclient behaviour
1 parent 2ffdc49 commit 4fff7fc

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

java/client/src/org/openqa/selenium/remote/internal/OkHttpClient.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717

1818
package org.openqa.selenium.remote.internal;
1919

20+
import static java.util.concurrent.TimeUnit.MINUTES;
21+
2022
import com.google.common.base.Strings;
2123

2224
import org.openqa.selenium.remote.http.HttpClient;
@@ -34,6 +36,7 @@
3436
import java.io.IOException;
3537
import java.net.URL;
3638
import java.util.Optional;
39+
import java.util.concurrent.TimeUnit;
3740

3841
public class OkHttpClient implements HttpClient {
3942

@@ -122,7 +125,8 @@ public HttpClient createClient(URL url) {
122125
okhttp3.OkHttpClient.Builder client = new okhttp3.OkHttpClient.Builder()
123126
.connectionPool(pool)
124127
.followRedirects(true)
125-
.followSslRedirects(true);
128+
.followSslRedirects(true)
129+
.readTimeout(0, MINUTES);
126130

127131
String info = url.getUserInfo();
128132
if (!Strings.isNullOrEmpty(info)) {

0 commit comments

Comments
 (0)