I have set socket timeout in SocketConfig and set SocketConfig to connection manager as
connManager.setDefaultSocketConfig(SocketConfig.custom().setSoTimeout(soTimeout).build())
And overwriting the socket timeout value for individual requests by setting it in RequestConfig as
httpRequest.setConfig(RequestConfig.copy(defaultRequestConfig).setSocketTimeout(timeout).build())
Reference link.
For all http requests, the new value set using RequestConfig is overwriting the old value as expected. But for https requests it is always considering the old value which was set in SocketConfig.
I also upgraded httpclient from 4.3.1 to 4.3.6 after learning that this could be an issue in 4.3.1 reference link.
But even this didn't help me solving the issue.
Am I missing anything ? Any idea on how I can solve this issue ?