[
https://issues.apache.org/jira/browse/AWF-29?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Tony Stevenson moved DEFT-126 to AWF-29:
----------------------------------------
Reporter: Niklas Gustavsson
Key: AWF-29 (was: DEFT-126)
Project: Apache AWF (was: Deft)
> Timeout is not cancelled upon onFailure in AsynchronousHttpClient
> -----------------------------------------------------------------
>
> Key: AWF-29
> URL: https://issues.apache.org/jira/browse/AWF-29
> Project: Apache AWF
> Issue Type: Bug
> Reporter: Niklas Gustavsson
>
> e,g
> Slightly modified AsynchronousHttpClientExample.java:
> public static void main(String[] args) {
> AsynchronousHttpClient client = new AsynchronousHttpClient();
> client.fetch("http://tasdfadst.se/start/", new
> ResultCallback());
> IOLoop.INSTANCE.start();
> }
>
> private static class ResultCallback implements
> AsyncResult<HttpResponse> {
> @Override public void onFailure(Throwable caught) {
> out.println("exception caught: " + caught); }
> @Override public void onSuccess(HttpResponse response) {
> out.println("http resonse:\n" + response); }
>
> }
> Here we expect onFailure to be called with a
> java.nio.channels.UnresolvedAddressException
> because of the unresolvable hostname.
> The problem is that we dont cancel the timeout (upon onFailure) that
> associated with the connect call, and hence, we will get another
> onFailure-callback after the timeout has reached its deadline (~15s).
> Solution: The timeout should be cancelled upon connect failure
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira