abdera-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James M Snell (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (ABDERA-49) AutoReleasingInputStream leaks connections in case of error
Date Fri, 13 Jul 2007 06:16:04 GMT

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

James M Snell resolved ABDERA-49.
---------------------------------

    Resolution: Fixed

Fixed

> AutoReleasingInputStream leaks connections in case of error
> -----------------------------------------------------------
>
>                 Key: ABDERA-49
>                 URL: https://issues.apache.org/jira/browse/ABDERA-49
>             Project: Abdera
>          Issue Type: Bug
>    Affects Versions: 0.2.2
>            Reporter: Ugo Cei
>            Assignee: Ugo Cei
>            Priority: Critical
>             Fix For: 0.3.0
>
>
> If an exception occurs when reading from an AutoReleasingInputStream, the connection
won't be closed, leading to a leak. The implementation of the method should be
>   public int read() throws IOException {
>       try {
>           int r = super.read();
>           if (r == -1) method.releaseConnection();
>           return r;
>       } catch (IOException e) {
>           method.releaseConnection();
>           throw e;
>       }
>   }
> Same for read(byte[] b, int off, int len).

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


Mime
View raw message