[
https://issues.apache.org/jira/browse/DIRMINA-602?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Julien Vermillard resolved DIRMINA-602.
---------------------------------------
Resolution: Duplicate
Assignee: Julien Vermillard
Duplicate of DIRMINA-584
> Socket.destroy should be called when AprSession is destroyed
> ------------------------------------------------------------
>
> Key: DIRMINA-602
> URL: https://issues.apache.org/jira/browse/DIRMINA-602
> Project: MINA
> Issue Type: Bug
> Components: Transport
> Affects Versions: 2.0.0-M2
> Environment: 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
> Reporter: Geoff Cadien
> Assignee: Julien Vermillard
>
> 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 ([email protected])
> * @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);
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.