You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "guojilin (JIRA)" <ji...@apache.org> on 2016/05/17 02:51:12 UTC

[jira] [Created] (DIRMINA-1036) Handler leak in NioSocketConnector

guojilin created DIRMINA-1036:
---------------------------------

             Summary: Handler leak in NioSocketConnector
                 Key: DIRMINA-1036
                 URL: https://issues.apache.org/jira/browse/DIRMINA-1036
             Project: MINA
          Issue Type: Bug
            Reporter: guojilin


When NioSocketConnector.connect(SocketAddress, SocketAddress) is called, and remoteAddress is reachable but localAddress is not assigned, a handler will leak.

In NioSocketConnector.newHandle(SocketAddress localAddress),  SocketChannel.open() and SocketChannel.socket().bind() are called. If localAddress is not assigend, open() returns normally but a java.net.BindException will throw at bind().
In its caller, AbstractPollingIoConnector.connect0(), it catches exception but can not get the opened SocketChannel.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)