Opt out of default OkHttp read timeout for indefinitely blocking HTTP requests

This commit is contained in:
Cameron Gutman 2018-02-14 18:30:17 -08:00
parent 37cde22a55
commit 636c1ceb26

View File

@ -100,6 +100,7 @@ public class NvHTTP {
httpClient.setConnectionPool(new ConnectionPool(0, 1)); httpClient.setConnectionPool(new ConnectionPool(0, 1));
httpClient.setHostnameVerifier(hv); httpClient.setHostnameVerifier(hv);
httpClient.setReadTimeout(0, TimeUnit.MILLISECONDS);
httpClient.setConnectTimeout(CONNECTION_TIMEOUT, TimeUnit.MILLISECONDS); httpClient.setConnectTimeout(CONNECTION_TIMEOUT, TimeUnit.MILLISECONDS);
httpClientWithReadTimeout = httpClient.clone(); httpClientWithReadTimeout = httpClient.clone();