Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8236464

SO_LINGER option is ignored by SSLSocket in JDK 11

XMLWordPrintable

    • b21
    • x86
    • linux
    • Not verified

        A DESCRIPTION OF THE PROBLEM :
        We have been setting SO_LINGER to 0 so we can close a secure connection promptly. This has been working well for us in JDK 9 and JDK 10. But it stops working when we move to JDK 11. In JDK 11, it can take 30 seconds to one minute to have a socket really closed (close_notify sent) even with SO_LINGER set to 0.

        Comparing source code of JDK 10 and JDK 11, it seems that the SO_LINGER option is ignored in JDK 11.


        CUSTOMER SUBMITTED WORKAROUND :
        We have done quite some research but can't find a workaround.

        FREQUENCY : always


          1. testkeys
            1 kB
          2. SSLSocketServer.java
            2 kB
          3. SSLSocketClient.java
            3 kB
          4. samplecacerts
            27 kB

              xuelei Xuelei Fan
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: