MNT-19887: Non-responsive SOLR address breaks admin console pages (#126)

- add setter for Socket Timeout

(cherry picked from commit 5609c805d4)
This commit is contained in:
CezarLeahu
2020-04-21 12:20:42 +03:00
committed by Cezar.Leahu
parent edeba4ae52
commit ce31b06477

View File

@@ -249,6 +249,18 @@ public class HttpClientFactory
this.maxHostConnections = maxHostConnections;
}
/**
* Sets the default socket timeout (<tt>SO_TIMEOUT</tt>) 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).