From 68b8d3ada1f6f93a3f9360170287d6264cecec7b Mon Sep 17 00:00:00 2001 From: Tomasz Wrobel Date: Thu, 19 Mar 2020 14:59:03 +0100 Subject: Fix timeout issue when cert service is unavailable Issue-ID: AAF-1107 Signed-off-by: Tomasz Wrobel Change-Id: I0fd5f2615345e9d018af766b665971b90de6c3a0 --- .../certservice/client/httpclient/CloseableHttpClientProvider.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'certServiceClient') diff --git a/certServiceClient/src/main/java/org/onap/aaf/certservice/client/httpclient/CloseableHttpClientProvider.java b/certServiceClient/src/main/java/org/onap/aaf/certservice/client/httpclient/CloseableHttpClientProvider.java index ff29a14d..5ad933ff 100644 --- a/certServiceClient/src/main/java/org/onap/aaf/certservice/client/httpclient/CloseableHttpClientProvider.java +++ b/certServiceClient/src/main/java/org/onap/aaf/certservice/client/httpclient/CloseableHttpClientProvider.java @@ -34,7 +34,11 @@ public class CloseableHttpClientProvider { public CloseableHttpClient getClient() { RequestConfig config = - RequestConfig.custom().setConnectionRequestTimeout(timeout).build(); + RequestConfig.custom() + .setConnectionRequestTimeout(timeout) + .setConnectTimeout(timeout) + .setSocketTimeout(timeout) + .build(); return HttpClientBuilder.create().setDefaultRequestConfig(config).build(); } } -- cgit 1.2.3-korg