You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Eric Jensen (JIRA)" <ji...@apache.org> on 2010/09/10 04:45:34 UTC

[jira] Created: (THRIFT-896) TNonblockingSocket.isOpen() returns true even after close()

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

                 Key: THRIFT-896
                 URL: https://issues.apache.org/jira/browse/THRIFT-896
             Project: Thrift
          Issue Type: Bug
    Affects Versions: 0.4, 0.5
            Reporter: Eric Jensen
            Assignee: Bryan Duxbury
            Priority: Critical
             Fix For: 0.5
         Attachments: fix_nonblock_sock_isopen.diff

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.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (THRIFT-896) TNonblockingSocket.isOpen() returns true even after close()

Posted by "Eric Jensen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-896?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Jensen updated THRIFT-896:
-------------------------------

    Attachment:     (was: fix_nonblock_sock_isopen.diff)

> TNonblockingSocket.isOpen() returns true even after close()
> -----------------------------------------------------------
>
>                 Key: THRIFT-896
>                 URL: https://issues.apache.org/jira/browse/THRIFT-896
>             Project: Thrift
>          Issue Type: Bug
>    Affects Versions: 0.4, 0.5
>            Reporter: Eric Jensen
>            Assignee: Bryan Duxbury
>            Priority: Critical
>             Fix For: 0.5
>
>         Attachments: fix_nonblock_sock_isopen.diff
>
>
> 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.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (THRIFT-896) TNonblockingSocket.isOpen() returns true even after close()

Posted by "Eric Jensen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-896?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12908090#action_12908090 ] 

Eric Jensen commented on THRIFT-896:
------------------------------------

no, but i just fixed it in the updated patch

> TNonblockingSocket.isOpen() returns true even after close()
> -----------------------------------------------------------
>
>                 Key: THRIFT-896
>                 URL: https://issues.apache.org/jira/browse/THRIFT-896
>             Project: Thrift
>          Issue Type: Bug
>    Affects Versions: 0.4, 0.5
>            Reporter: Eric Jensen
>            Assignee: Bryan Duxbury
>            Priority: Critical
>             Fix For: 0.5
>
>         Attachments: fix_nonblock_sock_isopen.diff
>
>
> 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.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (THRIFT-896) TNonblockingSocket.isOpen() returns true even after close()

Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-896?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12908045#action_12908045 ] 

Bryan Duxbury commented on THRIFT-896:
--------------------------------------

This patch looks pretty good. Is there some reason why you made the socket address package-private instead of the original private?

> TNonblockingSocket.isOpen() returns true even after close()
> -----------------------------------------------------------
>
>                 Key: THRIFT-896
>                 URL: https://issues.apache.org/jira/browse/THRIFT-896
>             Project: Thrift
>          Issue Type: Bug
>    Affects Versions: 0.4, 0.5
>            Reporter: Eric Jensen
>            Assignee: Bryan Duxbury
>            Priority: Critical
>             Fix For: 0.5
>
>         Attachments: fix_nonblock_sock_isopen.diff
>
>
> 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.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (THRIFT-896) TNonblockingSocket.isOpen() returns true even after close()

Posted by "Eric Jensen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-896?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Jensen updated THRIFT-896:
-------------------------------

    Attachment: fix_nonblock_sock_isopen.diff

> TNonblockingSocket.isOpen() returns true even after close()
> -----------------------------------------------------------
>
>                 Key: THRIFT-896
>                 URL: https://issues.apache.org/jira/browse/THRIFT-896
>             Project: Thrift
>          Issue Type: Bug
>    Affects Versions: 0.4, 0.5
>            Reporter: Eric Jensen
>            Assignee: Bryan Duxbury
>            Priority: Critical
>             Fix For: 0.5
>
>         Attachments: fix_nonblock_sock_isopen.diff
>
>
> 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.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (THRIFT-896) TNonblockingSocket.isOpen() returns true even after close()

Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-896?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bryan Duxbury closed THRIFT-896.
--------------------------------

      Assignee: Eric Jensen  (was: Bryan Duxbury)
    Resolution: Fixed

Great, I just committed this.

> TNonblockingSocket.isOpen() returns true even after close()
> -----------------------------------------------------------
>
>                 Key: THRIFT-896
>                 URL: https://issues.apache.org/jira/browse/THRIFT-896
>             Project: Thrift
>          Issue Type: Bug
>    Affects Versions: 0.4, 0.5
>            Reporter: Eric Jensen
>            Assignee: Eric Jensen
>            Priority: Critical
>             Fix For: 0.5
>
>         Attachments: fix_nonblock_sock_isopen.diff
>
>
> 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.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (THRIFT-896) TNonblockingSocket.isOpen() returns true even after close()

Posted by "Eric Jensen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-896?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Jensen updated THRIFT-896:
-------------------------------

    Attachment: fix_nonblock_sock_isopen.diff

> TNonblockingSocket.isOpen() returns true even after close()
> -----------------------------------------------------------
>
>                 Key: THRIFT-896
>                 URL: https://issues.apache.org/jira/browse/THRIFT-896
>             Project: Thrift
>          Issue Type: Bug
>    Affects Versions: 0.4, 0.5
>            Reporter: Eric Jensen
>            Assignee: Bryan Duxbury
>            Priority: Critical
>             Fix For: 0.5
>
>         Attachments: fix_nonblock_sock_isopen.diff
>
>
> 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.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.