You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@abdera.apache.org by "Ugo Cei (JIRA)" <ji...@apache.org> on 2007/06/15 17:49:26 UTC
[jira] Created: (ABDERA-49) AutoReleasingInputStream leaks
connections in case of error
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.
[jira] Resolved: (ABDERA-49) AutoReleasingInputStream leaks
connections in case of error
Posted by "James M Snell (JIRA)" <ji...@apache.org>.
[ 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.