RFC 7230: increased the default max number of concurrent connection for the same route from 2 to 5
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1684110 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ce86e3ed81
commit
5d1871a8a0
|
@ -100,6 +100,9 @@ public class PoolingHttpClientConnectionManager
|
|||
|
||||
private final Log log = LogFactory.getLog(getClass());
|
||||
|
||||
public static final int DEFAULT_MAX_TOTAL_CONNECTIONS = 25;
|
||||
public static final int DEFAULT_MAX_CONNECTIONS_PER_ROUTE = 5;
|
||||
|
||||
private final ConfigData configData;
|
||||
private final CPool pool;
|
||||
private final HttpClientConnectionOperator connectionOperator;
|
||||
|
@ -172,7 +175,9 @@ public class PoolingHttpClientConnectionManager
|
|||
super();
|
||||
this.configData = new ConfigData();
|
||||
this.pool = new CPool(new InternalConnectionFactory(
|
||||
this.configData, connFactory), 2, 20, timeToLive, tunit);
|
||||
this.configData, connFactory),
|
||||
DEFAULT_MAX_CONNECTIONS_PER_ROUTE, DEFAULT_MAX_TOTAL_CONNECTIONS,
|
||||
timeToLive, tunit);
|
||||
this.pool.setValidateAfterInactivity(2000);
|
||||
this.connectionOperator = Args.notNull(httpClientConnectionOperator, "HttpClientConnectionOperator");
|
||||
this.isShutDown = new AtomicBoolean(false);
|
||||
|
|
Loading…
Reference in New Issue