Uploaded image for project: 'HttpComponents HttpCore'
  1. HttpComponents HttpCore
  2. HTTPCORE-289

Cancellable#cancel() not invoked when network connection dies

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.2-beta1
    • Fix Version/s: 4.2
    • Component/s: HttpCore NIO
    • Labels:
      None

      Description

      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.

        Attachments

        1. Test.java
          2 kB
          Geir Harald Hansen

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              drharibo Geir Harald Hansen
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: