You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Keith Wall (JIRA)" <ji...@apache.org> on 2016/04/12 12:46:25 UTC

[jira] [Commented] (QPID-7195) Ensure socket is closed if Socket#connect times out or fails

    [ https://issues.apache.org/jira/browse/QPID-7195?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15236979#comment-15236979 ] 

Keith Wall commented on QPID-7195:
----------------------------------

My testing on a MBA (1.7 GHz Intel Core i7) running jdk1.7.0_45.jdk showed neither file handles nor memory was leaked when trying to connect to a server that whilst listening was not accepting new connections, but this may not be case for all failure scenarios and all platforms.  Closing the socket on the event of IOException seems to be the safe solution.



> Ensure socket is closed if Socket#connect times out or fails
> ------------------------------------------------------------
>
>                 Key: QPID-7195
>                 URL: https://issues.apache.org/jira/browse/QPID-7195
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Client
>            Reporter: Keith Wall
>            Priority: Minor
>             Fix For: qpid-java-6.1
>
>
> Currently, if the {{java.net.Socket#connect(java.net.SocketAddress, int)}} in the client throws an IOException, the socket is not closed.  This could potentially lead to a resource leak from an application.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org