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

ServerSocket is not thread safe

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • P3
    • Resolution: Fixed
    • 18
    • 18
    • core-libs
    • None
    • b27

    Backports

      Description

        There are several thread safety issues in java.net.ServerSocket. These can be fixed by:

        1. Changing impl to be a final field.
        2. Promote closeLock to be a general "state lock" and require it to set the (volatile) created, bound, and closed fields.
        3. Use the state lock when binding so that it can coordinate with async close of the ServerSocket.

        Attachments

          Issue Links

            Activity

              People

                alanb Alan Bateman
                alanb Alan Bateman
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: