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.