SOLR-1096 followup -- Change default connection timeout to 5 seconds and read timeout to 20 seconds

git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@765483 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Shalin Shekhar Mangar 2009-04-16 06:29:53 +00:00
parent 67fa0ec527
commit 7769e35924

View File

@ -110,8 +110,8 @@ public class SnapPuller {
// no requests are kept waiting for an idle connection. // no requests are kept waiting for an idle connection.
mgr.getParams().setDefaultMaxConnectionsPerHost(10000); mgr.getParams().setDefaultMaxConnectionsPerHost(10000);
mgr.getParams().setMaxTotalConnections(10000); mgr.getParams().setMaxTotalConnections(10000);
mgr.getParams().setSoTimeout(connTimeout == null ? 5000 : Integer.parseInt(connTimeout)); //5 secs mgr.getParams().setSoTimeout(connTimeout == null ? 20000 : Integer.parseInt(connTimeout)); //20 secs
mgr.getParams().setConnectionTimeout(readTimeout == null ? 10000 : Integer.parseInt(readTimeout)); //10 secs mgr.getParams().setConnectionTimeout(readTimeout == null ? 5000 : Integer.parseInt(readTimeout)); //5 secs
HttpClient httpClient = new HttpClient(mgr); HttpClient httpClient = new HttpClient(mgr);
if (client == null && connTimeout == null && readTimeout == null) client = httpClient; if (client == null && connTimeout == null && readTimeout == null) client = httpClient;
return httpClient; return httpClient;