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

Idle timeout on HTTPS connection does not work

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 5.2.1
    • 5.2.2
    • HttpCore NIO
    • None

    Description

      I'm having issues trying to set an idle timeout on https connections on an asynchronous HTTPS server. This is what I'm doing:

               IOReactorConfig ioReactorConfig = IOReactorConfig.custom()
                       .setIoThreadCount(4)
                       .setSoTimeout(5000, TimeUnit.MILLISECONDS)
                       .setTcpNoDelay(false)
                       .setSoReuseAddress(true)
                       .setBacklogSize(0)
                       .build(); 

      And passing that ioReactorConfig to DefaultListeningIOReactor, and an IOSessionListener to be notified of timed out connections.

      So the thing is, for plain http connections, that timeout works (my listener is called after 5 seconds, when the other end stops sending data), but on https connections, it does not work, and I need connections to be closed.

      Attached maven project that reproduces this issue.

      Class TestHttpsTimeout has a main() method that initializes the HTTPS server, using httpcore, and then acts as a HTTPS client that stops sending data after sending 25000 out of 50000 bytes (line 141). At this point I'm unable to detect this idle connection from server side.

      Attachments

        1. httpsTimeout.zip
          45 kB
          Isaac Cruz Ballesteros

        Activity

          People

            Unassigned Unassigned
            icruz Isaac Cruz Ballesteros
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: