abdera-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ugo Cei (JIRA)" <j...@apache.org>
Subject [jira] Created: (ABDERA-49) AutoReleasingInputStream leaks connections in case of error
Date Fri, 15 Jun 2007 15:49:26 GMT
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) {
          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.

View raw message