| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| I'm using MINA 2.0.0 M2 , java 1.6. The problem is that IoAcceptor.unbind() doesn't seem to work . The clients are not disconnected ( the disconnect is set ), and the port is not released at all. Even after closing the program, the port is still used and freed on a later time by the operating system. My code for the unbinding operation is : try { acceptor.unbind(new InetSocketAddress(portValue)); } catch(Exception exception) { exception.printStackTrace(); } acceptor is an IoAcceptor object, also, there is no exception. I tried to browse the sources but I couldn't find the bind0 method used for unbinding, only in some abstract version that needs implementing. Maybe I'm doing something wrong ? Thanks a lot |
|
#2
| |||
| |||
| Could you please provide a sample program that demonstrates this behavior? Thanks On Fri, Jul 18, 2008 at 6:13 AM, Eugen <pupicutz2000-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > I'm using MINA 2.0.0 M2 , java 1.6. > The problem is that IoAcceptor.unbind() doesn't seem to work . The clients > are not disconnected ( the disconnect is set ), and the port is not > released > at all. Even after closing the program, the port is still used and freed on > a later time by the operating system. > My code for the unbinding operation is : > try > { > acceptor.unbind(new InetSocketAddress(portValue)); > > } > catch(Exception exception) > { > exception.printStackTrace(); > } > > acceptor is an IoAcceptor object, also, there is no exception. > I tried to browse the sources but I couldn't find the bind0 method used for > unbinding, only in some abstract version that needs implementing. > Maybe I'm doing something wrong ? > > Thanks a lot > |
|
#3
| |||
| |||
| Hi, After more tests, it seems that it's more of a platform issue. While on windows, it works fine, on Linux and Solaris, the problem appears. On linux ( I tested on Kubuntu 8 and Suse 10.3 ) , my tests indicate that the OS is releasing the ports after a minute or so, while on Solaris the ports remain in use until system reboot. I mention that this problem does not appear with mina 1.1.7 which I previously used. I don't know what piece of code I might be adding to this mail to make things clear, so I give you the svn checkout address for my source : http://dshub.svn.sf.net/svnroot/dshub/trunk The file that starts the mina server and handles port adding/removing is HubServer.java and the IoHandlerAdapter subclass is SimpleHandler.java Thanks for helping out |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.