[
https://issues.apache.org/jira/browse/DIRMINA-831?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13025685#comment-13025685
]
Christian Schwarz commented on DIRMINA-831:
-------------------------------------------
Hi,
i attached a short screencast (
https://issues.apache.org/jira/secure/attachment/12477488/DIRMINA-831.avi ) of
a Test-App run (non-Debug-Mode) i made.
You can see the following:
1. ActivPorts is started
2. the TestApp is started
3. after 5sec the NioSocketConnector will be created
4. after 5sec the NioSocketConnector will be disposed
5. after 5sec the TestApp will terminate
You can see that the ports will be opened only if we create a
NioSocketConnector , after it is dispose the open ports disapear.
Here is the Test-App code:
public static void main(String[] args) throws Exception {
Thread.sleep(5000);
System.err.println("creation");
NioSocketConnector connector = new NioSocketConnector();
System.err.println("running");
Thread.sleep(5000);
connector.dispose(true);
System.err.println("disposed");
Thread.sleep(5000);
}
I hope that helps
Thanks Chris
> NioSocketConnector create unused Connections, even when #connect(..) is not
> called.
> -----------------------------------------------------------------------------------
>
> Key: DIRMINA-831
> URL: https://issues.apache.org/jira/browse/DIRMINA-831
> Project: MINA
> Issue Type: Bug
> Components: Core
> Affects Versions: 2.0.2
> Environment: win32, x86, winXP
> Reporter: Christian Schwarz
> Attachments: DIRMINA-831.avi, DIRMINA-831.jpg
>
>
> Hello,
> we are using Mina to access different types of network devices (Webcams,
> Digital-IO-Boxes, Access Control Systems,...). For every type of device we
> use a dedicated IoConnector because of the different protocols. Under some
> circumstances we get an "java.net.SocketException: No buffer space available
> (maximum connections reached?): connect". We figured out that for every
> created NioSocketConnector 8 connections will be created from localhost to
> localhost with different ports, even if we do no connect at all. So if we use
> many NioSocketConnector's we quickly run out of available ports, i guess.
> Is it possible to tune the NioSocketConnector so it only opens a port when
> we call #connect(..) ?
> Thanks in advance
> Chris
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira