Return-Path: X-Original-To: apmail-hc-dev-archive@www.apache.org Delivered-To: apmail-hc-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 826C2B082 for ; Sun, 8 Jan 2012 21:21:02 +0000 (UTC) Received: (qmail 85845 invoked by uid 500); 8 Jan 2012 21:21:01 -0000 Delivered-To: apmail-hc-dev-archive@hc.apache.org Received: (qmail 84811 invoked by uid 500); 8 Jan 2012 21:21:00 -0000 Mailing-List: contact dev-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list dev@hc.apache.org Received: (qmail 84796 invoked by uid 99); 8 Jan 2012 21:21:00 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 08 Jan 2012 21:21:00 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 08 Jan 2012 21:20:59 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 364D913EE52 for ; Sun, 8 Jan 2012 21:20:39 +0000 (UTC) Date: Sun, 8 Jan 2012 21:20:39 +0000 (UTC) From: "Geir Harald Hansen (Commented) (JIRA)" To: dev@hc.apache.org Message-ID: <9452114.20205.1326057639223.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1448931198.19988.1326040179270.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (HTTPCORE-289) Cancellable#cancel() not invoked when network connection dies MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HTTPCORE-289?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13182294#comment-13182294 ] Geir Harald Hansen commented on HTTPCORE-289: --------------------------------------------- IOEventDispatch#disconnected() doesn't get fired when the connection is lost. Only if I eventually try to send a response, which fails because the connection is long gone. I will try the latest SVN snapshot and see if I can come up with a minimal example. > 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