zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rakesh R (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (ZOOKEEPER-1753) ClientCnxn is not properly releasing the resources, which are used to ping RwServer
Date Thu, 05 Sep 2013 14:55:52 GMT

     [ https://issues.apache.org/jira/browse/ZOOKEEPER-1753?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Rakesh R updated ZOOKEEPER-1753:
--------------------------------

    Attachment: 0001-ZOOKEEPER-1753-fix-branch-3_4.patch
    
> ClientCnxn is not properly releasing the resources, which are used to ping RwServer
> -----------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1753
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1753
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: java client
>            Reporter: Rakesh R
>            Assignee: Rakesh R
>             Fix For: 4.0.0, 3.4.6
>
>         Attachments: 0001-ZOOKEEPER-1753-fix-branch-3_4.patch, 0001-ZOOKEEPER-1753.patch
>
>
> While pinging to the RwServer, ClientCnxn is opening a socket and using BufferedReader.
These are not properly closed in finally block and could cause leaks on exceptional cases.
> ClientCnxn#pingRwServer()
> {code}
>             try {
>                 Socket sock = new Socket(addr.getHostName(), addr.getPort());
>                 BufferedReader br = new BufferedReader(
>                         new InputStreamReader(sock.getInputStream()));
>                 ......
>                 sock.close();
>                 br.close();
>             } catch (ConnectException e) {
>                 // ignore, this just means server is not up
>             } catch (IOException e) {
>                 // some unexpected error, warn about it
>                 LOG.warn("Exception while seeking for r/w server " +
>                         e.getMessage(), e);
>             }
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message