mirror of
https://github.com/Alfresco/SearchServices.git
synced 2026-09-16 18:12:56 +00:00
Merge pull request #919 from Alfresco/fix/SEARCH-2401_HttpSocketTimeOut
SEARCH-2401: Add socketTimeOut parameter to HttpConnections (cherry picked from commit cb64ba034c727b108e4588e39615ca6b1f36db67)
This commit is contained in:
+8
-1
@@ -4091,7 +4091,14 @@ public class SolrInformationServer implements InformationServer
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
LOGGER.error("Unable to get nodes metadata from repository. See the stacktrace below for further details.", exception);
|
||||
LOGGER.error("Unable to get nodes metadata from repository using "
|
||||
+ "fromNodeId=" + parameters.getFromNodeId() + ", "
|
||||
+ "toNodeId=" + parameters.getToNodeId() + ", "
|
||||
+ "nodeIds=" + parameters.getNodeIds() + ", "
|
||||
+ "fromTxId=" + parameters.getFromTxnId() + ", "
|
||||
+ "toTxId=" + parameters.getToTxnId() + ", "
|
||||
+ "txIds=" + parameters.getTransactionIds()
|
||||
+ ". See the stacktrace below for further details.", exception);
|
||||
return empty();
|
||||
}
|
||||
}
|
||||
|
||||
+3
-2
@@ -195,7 +195,7 @@ public class SOLRAPIClientFactory
|
||||
else
|
||||
{
|
||||
httpClientFactory = new PlainHttpClientFactory(alfrescoHost, alfrescoPort, maxTotalConnections,
|
||||
maxHostConnections);
|
||||
maxHostConnections, socketTimeout);
|
||||
}
|
||||
|
||||
AlfrescoHttpClient repoClient = httpClientFactory.getRepoClient(alfrescoHost, alfrescoPortSSL);
|
||||
@@ -235,13 +235,14 @@ public class SOLRAPIClientFactory
|
||||
*/
|
||||
class PlainHttpClientFactory extends HttpClientFactory
|
||||
{
|
||||
public PlainHttpClientFactory(String host, int port, int maxTotalConnections, int maxHostConnections)
|
||||
public PlainHttpClientFactory(String host, int port, int maxTotalConnections, int maxHostConnections, int socketTimeout)
|
||||
{
|
||||
setSecureCommsType("none");
|
||||
setHost(host);
|
||||
setPort(port);
|
||||
setMaxTotalConnections(maxTotalConnections);
|
||||
setMaxHostConnections(maxHostConnections);
|
||||
setSocketTimeout(socketTimeout);
|
||||
init();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user