Description
look at below codes, when localAddress is not right of client machine,it will throw java.net.BindException.
then, it will have no chance to do this : ch.socket().close()
this problem is that the file handle will never be released.
I have test in aix and the way of getting nums of file handle is:
lsof -s |grep java
source code
mina2.0.7
NioSocketConnector.java protected SocketChannel newHandle(SocketAddress localAddress) throws Exception { SocketChannel ch = SocketChannel.open(); int receiveBufferSize = (getSessionConfig()).getReceiveBufferSize(); if (receiveBufferSize > 65535) { ch.socket().setReceiveBufferSize(receiveBufferSize); } if (localAddress != null) { ch.socket().bind(localAddress); } ch.configureBlocking(false); return ch; }
Attachments
Issue Links
- is duplicated by
-
DIRMINA-1036 Handler leak in NioSocketConnector
- Resolved