But NioSocketAcceptor.close(ServerSocketChannel handle) is protected not visible to me ...
-----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Emmanuel Lecharny Sent: Tuesday, June 02, 2009 8:44 AM To: [email protected] Subject: Re: java.net.BindException: Address already in use On Tue, Jun 2, 2009 at 2:26 PM, Zhijun Sheng <[email protected]> wrote: > Hi, Emmanuel, > > I did try to call IoSession.close(true) on all the current connections on my > server and also > > for (int i = 0; i < acceptors.length; i++) { > logger.info("running acceptor.unbind() ..."); > acceptors[i].unbind(); > logger.info("running acceptor.dispose() ..."); > acceptors[i].dispose(); > } > > but couldn't get rid of the subjected problem. > > Could you tell me what I did it wrongly? I guess you should also call the acceptor.close'( ServerSocketChannel handle ) as you have called the accept() method. (from the top of my head, I don't have access to the code atm) -- Regards, Cordialement, Emmanuel Lécharny www.iktek.com
