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

XMLWordPrintable

    • hopper
    • generic
    • generic
    • Verified


      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

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: