From ce31b0647705a1c656c4c801d021a23cedd597fd Mon Sep 17 00:00:00 2001 From: CezarLeahu <35226487+CezarLeahu@users.noreply.github.com> Date: Tue, 21 Apr 2020 12:20:42 +0300 Subject: [PATCH] MNT-19887: Non-responsive SOLR address breaks admin console pages (#126) - add setter for Socket Timeout (cherry picked from commit 5609c805d48eec09b9bfe91863d350b0d6079178) --- .../org/alfresco/httpclient/HttpClientFactory.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/main/java/org/alfresco/httpclient/HttpClientFactory.java b/src/main/java/org/alfresco/httpclient/HttpClientFactory.java index 31356cb7aa..45a70358e4 100644 --- a/src/main/java/org/alfresco/httpclient/HttpClientFactory.java +++ b/src/main/java/org/alfresco/httpclient/HttpClientFactory.java @@ -249,6 +249,18 @@ public class HttpClientFactory this.maxHostConnections = maxHostConnections; } + /** + * Sets the default socket timeout (SO_TIMEOUT) in milliseconds which is the + * timeout for waiting for data. A timeout value of zero is interpreted as an infinite + * timeout. + * + * @param socketTimeout Timeout in milliseconds + */ + public void setSocketTimeout(Integer socketTimeout) + { + this.socketTimeout = socketTimeout; + } + /** * Attempts to connect to a server will timeout after this period (millis). * Default is zero (the timeout is not used).