Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-896

TNonblockingSocket.isOpen() returns true even after close()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 0.4, 0.5
    • 0.5
    • None
    • None
    • Patch Available

    Description

      SocketChannel.isConnected() has this broken behavior http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6341625, but TSocket corrects it by setting its Socket to null in close() and then checking that in isOpen(). This patch does something similar by checking SocketChannel.isOpen() which has the correct semantics. Added an assertion that exposed the previous failure. Also remove reference to derived Socket since it just confused matters.

      Attachments

        1. fix_nonblock_sock_isopen.diff
          4 kB
          Eric Jensen

        Activity

          People

            ericcj Eric Jensen
            ericcj Eric Jensen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: