wallgreat created DIRMINA-928:
---------------------------------
Summary: when client want to connect to server by binding wrong ip
address,there is a bug.
Key: DIRMINA-928
URL: https://issues.apache.org/jira/browse/DIRMINA-928
Project: MINA
Issue Type: Bug
Components: Core
Affects Versions: 2.0.7
Environment: aix6.1
Reporter: wallgreat
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;
}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira