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

close() is isClosed() not synchronized on socket state

    XMLWordPrintable

Details

    • hopper
    • generic
    • generic
    • Verified

    Description


      Socket, ServerSocket, and DatagramSocket's close() and isClosed() methods
      aren't property synchronized so it's possible for isClosed() to return
      'false' even though the socket has just been closed.

      This issue can be demonatrated with test/java/net/Socket/InheritTimeout.java
      if the following is uncommented :-

      // Socket.isClosed isn't synchronized - when this is
                      // fixed uncomment the following
                      //throw e;

      ###@###.### 2001-11-08

      Attachments

        Activity

          People

            jccollet Jean-Christophe Collet (Inactive)
            alanb Alan Bateman
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: