6

Following is my code

       RequestConfig requestConfig = RequestConfig.custom()
                .setSocketTimeout(100)
                .setConnectTimeout(100)
                .setConnectionRequestTimeout(100).build();


        CloseableHttpAsyncClient httpClient = HttpAsyncClients.custom()
                .setDefaultRequestConfig(requestConfig)
                .build();

        httpClient.start();

According to setSocketTimeout value, it should timeout in 100 ms, but it is taking 1000 ms to timeout. setSocketTimeout is honouring all value greater than 1000 ms, though.

4

1 に答える 1