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

ASF GitHub Bot commented on ZOOKEEPER-2218:
-------------------------------------------

GitHub user sugartxy opened a pull request:

    https://github.com/apache/zookeeper/pull/36

    #ZOOKEEPER-2218 Close IO Streams in finally block

    Place the close method in the finally clause, so we can ensure it always 
runs regardless of how the method exits.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/sugartxy/zookeeper CloseRightly

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/zookeeper/pull/36.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #36
    
----
commit 90745d7476504630c1d68772c26546b28639ba91
Author: sugartxy <[email protected]>
Date:   2015-06-23T02:36:11Z

    #ZOOKEEPER-2218 Close IO Streams in finally block
    
    Place the close method in the finally clause, so we can ensure it always
    runs regardless of how the method exits.

----


> Close IO Streams in finally block
> ---------------------------------
>
>                 Key: ZOOKEEPER-2218
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2218
>             Project: ZooKeeper
>          Issue Type: Bug
>            Reporter: Tang Xinye
>            Priority: Critical
>
> The problem here is that if an exception is thrown during the read process 
> the method will exit without closing the stream and hence without releasing 
> the file system resources, it may run out of resources before it does run.



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

Reply via email to