[
https://issues.apache.org/jira/browse/HTTPASYNC-55?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13772922#comment-13772922
]
Piotr Bartosiewicz edited comment on HTTPASYNC-55 at 9/20/13 10:22 AM:
-----------------------------------------------------------------------
With latest SVN version also does not work.
Here is a simple complete test (assuming 'nc -l 8080' is running in some
terminal):
{code}
@Test
public void shouldThrow() throws Exception {
CloseableHttpAsyncClient httpClient = HttpAsyncClients.custom().build();
httpClient.start();
HttpGet request = new HttpGet("http://localhost:8080/");
request.setConfig(RequestConfig.custom().setSocketTimeout(1000).build());
Future<HttpResponse> future = httpClient.execute(request, null);
future.get();
// Should throw SocketTimeoutException but does not!
}
{code}
was (Author: bartex):
With latest SVN version also does not work.
Here is a simple complete test (assuming 'nc -l 8080' is running in some
terminal):
@Test
public void shouldThrow() throws Exception {
CloseableHttpAsyncClient httpClient = HttpAsyncClients.custom().build();
httpClient.start();
HttpGet request = new HttpGet("http://localhost:8080/");
request.setConfig(RequestConfig.custom().setSocketTimeout(1000).build());
Future<HttpResponse> future = httpClient.execute(request, null);
future.get();
// Should throw SocketTimeoutException but does not!
}
> Socket timeout set in RequestConfig does not work
> -------------------------------------------------
>
> Key: HTTPASYNC-55
> URL: https://issues.apache.org/jira/browse/HTTPASYNC-55
> Project: HttpComponents HttpAsyncClient
> Issue Type: Bug
> Affects Versions: 4.0-beta4
> Reporter: Piotr Bartosiewicz
>
> Should this code work?
> final RequestConfig requestConfig = RequestConfig.custom()
> .setConnectTimeout(connectTimeout)
> .setSocketTimeout(socketTimeout)
> .build();
> final CloseableHttpAsyncClient httpClient = HttpAsyncClients.custom()
> .setDefaultRequestConfig(requestConfig)
> .build();
> At least socket timeout does not work.
> I fount a workaround to set this timeouts in IOReactor.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]