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

Allow to enable SO_LINGER option with zero timeout

    XMLWordPrintableJSON

Details

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

    Description

      According to http://docs.oracle.com/javase/8/docs/api/java/net/StandardSocketOptions.html#SO_LINGER linger option is disabled by default. Currently if SocketConfig.soLinger is set to zero (default value is -1), then Socket.setSoLinger(false, 0) will be called, so linger will be disabled, which is undesirable. My suggestion is interpret zero soLinger value as Socket.setSoLinger(true, 0).

      I understand that this change will break backward compatibility of config interpretation, but can we have this in 4.4?

      Attachments

        1. httpcore-enable-linger.patch
          1 kB
          Dmitry Potapov

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: