parent
6599aecdf5
commit
6960b7db66
@ -62,13 +62,13 @@ public class HttpClient {
|
|||||||
// Create a connection manager with a custom socket timeout
|
// Create a connection manager with a custom socket timeout
|
||||||
PoolingHttpClientConnectionManager connManager = new PoolingHttpClientConnectionManager();
|
PoolingHttpClientConnectionManager connManager = new PoolingHttpClientConnectionManager();
|
||||||
final SocketConfig socketConfig = SocketConfig.custom()
|
final SocketConfig socketConfig = SocketConfig.custom()
|
||||||
.setSoTimeout(10, TimeUnit.SECONDS)
|
.setSoTimeout(60, TimeUnit.SECONDS)
|
||||||
.build();
|
.build();
|
||||||
connManager.setDefaultSocketConfig(socketConfig);
|
connManager.setDefaultSocketConfig(socketConfig);
|
||||||
|
|
||||||
defaultRequestConfig = RequestConfig.custom()
|
defaultRequestConfig = RequestConfig.custom()
|
||||||
.setConnectTimeout(30, TimeUnit.SECONDS)
|
.setConnectTimeout(60, TimeUnit.SECONDS)
|
||||||
.setConnectionRequestTimeout(30, TimeUnit.SECONDS) // TODO: 60 seconds in some places in old code
|
.setConnectionRequestTimeout(60, TimeUnit.SECONDS)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
httpClientBuilder = HttpClients.custom()
|
httpClientBuilder = HttpClients.custom()
|
||||||
|
Loading…
Reference in New Issue
Block a user