aboutsummaryrefslogtreecommitdiffstats
path: root/certServiceClient
diff options
context:
space:
mode:
authorTomasz Wrobel <tomasz.wrobel@nokia.com>2020-03-19 14:59:03 +0100
committerTomasz Wrobel <tomasz.wrobel@nokia.com>2020-03-23 09:00:55 +0100
commit68b8d3ada1f6f93a3f9360170287d6264cecec7b (patch)
treeaaf06885a2c0a38541df6cf2a7e46371884da4a7 /certServiceClient
parent8b74643e0738bd0266e510a422bf71cc67604f37 (diff)
Fix timeout issue when cert service is unavailable
Issue-ID: AAF-1107 Signed-off-by: Tomasz Wrobel <tomasz.wrobel@nokia.com> Change-Id: I0fd5f2615345e9d018af766b665971b90de6c3a0
Diffstat (limited to 'certServiceClient')
-rw-r--r--certServiceClient/src/main/java/org/onap/aaf/certservice/client/httpclient/CloseableHttpClientProvider.java6
1 files changed, 5 insertions, 1 deletions
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();
}
}