Uploaded image for project: 'MINA'
  1. MINA
  2. DIRMINA-602

Socket.destroy should be called when AprSession is destroyed

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 2.0.0-M2
    • None
    • Transport
    • None
    • Java(TM) SE Runtime Environment (build 1.6.0_06-b02)
      Java HotSpot(TM) Server VM (build 10.0-b22, mixed mode)
      Linux jellikit 2.6.24-17-generic #1 SMP Thu May 1 14:31:33 UTC 2008 i686 GNU/Linux
      MINA Trunk

    Description

      I believe that Socket.destroy should be called when a session is destroyed. It looks like Socket.accept creates a pool and it should be destroyed. I may be incorrect but it seemed to solve some issues I was having.

      Index: src/main/java/org/apache/mina/transport/socket/apr/AprIoProcessor.java
      ===================================================================
      — src/main/java/org/apache/mina/transport/socket/apr/AprIoProcessor.java (revision 656872)
      +++ src/main/java/org/apache/mina/transport/socket/apr/AprIoProcessor.java (working copy)
      @@ -43,7 +43,6 @@

      • @author The Apache MINA Project (dev@mina.apache.org)
      • @version $Rev$, $Date$
        */
        -
        public final class AprIoProcessor extends AbstractPollingIoProcessor<AprSession> { private static final int POLLSET_SIZE = 1024; @@ -239,6 +238,11 @@ }

        } finally {
        ret = Socket.close(session.getDescriptor());
        + // I think socket needs to be destroyed. When a connection is accepted
        + // a pool is allocated for the socket and I don't see how else it will
        + // get destroyed.
        + Socket.destroy(session.getDescriptor());
        + session.setDescriptor(0);
        if (ret != Status.APR_SUCCESS)

        { throwException(ret); }

      Attachments

        Activity

          People

            vrm Julien Vermillard
            gcadien Geoff Cadien
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: