You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Oleg Kalnichevski (Commented) (JIRA)" <ji...@apache.org> on 2012/01/08 19:13:39 UTC

[jira] [Commented] (HTTPCORE-289) Cancellable#cancel() not invoked when network connection dies

    [ https://issues.apache.org/jira/browse/HTTPCORE-289?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13182260#comment-13182260 ] 

Oleg Kalnichevski commented on HTTPCORE-289:
--------------------------------------------

That sounds bizarre. Are you sure IOEventDispatch#disconnected() never gets fired? If it does not, naturally HttpAsyncServiceHandler#closed() never gets called as well and the Cancellable cannot be canceled.

By the way, there has been a number of API changes in SVN trunk which will soon be released as 4.2-BETA-1. Please consider upgrading to the latest SVN snapshot and porting your application to the latest API. As of this point the 4.2 API is not expected to change (unless some major design flaws are discovered).

Oleg
                
> Cancellable#cancel() not invoked when network connection dies
> -------------------------------------------------------------
>
>                 Key: HTTPCORE-289
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-289
>             Project: HttpComponents HttpCore
>          Issue Type: Bug
>          Components: HttpCore NIO
>    Affects Versions: 4.2-alpha2
>            Reporter: Geir Harald Hansen
>
> I am rewriting my software to use the new API that comes with 4.2-alpha2. Returning a Cancellable from HttpAsyncRequestHandler#handle() seems like a good idea for long running requests like long polling. But I don't ever see Cancellable#cancel() being called.
> I telnet into my server and type the necessary HTTP to start a long running request. A Cancellable is created and returned from handle(). Then I kill the telnet process, thereby killing the connection. I expect cancel() to be invoked in the connection's Cancellable at this point, but nothing happens. cancel() is not invoked in my Cancellable, and there are no calls to HttpAsyncServiceHandler#closed(), HttpAsyncServiceHandler#exception() or DefaultServerIODispatch#onClosed() either.

--
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

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org