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

HttpAsyncService.exception(...) should shutdown connection on IOException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 4.3.2
    • 4.3.3, 4.4-alpha1
    • HttpCore NIO
    • None

    Description

      Currently, HttpAsyncService.exception(...) closes connection if response is already submitted. On TCP RST packet received all futher attempts to write into socket will result in IOException, but SelectionKey.readyOps() won't be changed. So, if connection output buffer has some unsent data, BaseIOReactor.writable() will be called again and again, but no data will be written, so reactor thread will stuck.

      I suggest to shutdown connection if IOException occured, this will save from infinite calls to BaseIOReactor.writable()

      Attachments

        1. NHttpServer.java
          5 kB
          Dmitry Potapov
        2. shutdown-on-IOException.patch
          0.9 kB
          Dmitry Potapov

        Activity

          People

            Unassigned Unassigned
            hirthwork Dmitry Potapov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: