PoolingHttpClientConnectionManager setMaxPerRoute(0) and setMaxTotal(0), what will happen?

StackOverflow https://stackoverflow.com/questions/22097947

  •  18-10-2022
  •  | 
  •  

Pregunta

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

PoolingHttpClientConnectionManager.setMaxPerRoute(0)
PoolingHttpClientConnectionManager.setMaxTotal(0)
¿Fue útil?

Solución

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.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top