Question

Does someone know if I set MaxPerRoute and MaxTotal of PoolingHttpClientConnectionManager to "0" like below, what will happen?

PoolingHttpClientConnectionManager.setMaxPerRoute(0)
PoolingHttpClientConnectionManager.setMaxTotal(0)
Was it helpful?

Solution

An exception

throw new IllegalArgumentException("Max value may not be negative or zero");

for both methods, check the org.apache.http.pool.AbstractConnPool class source code.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top