Re: [xSocket-develop] graceful shutdown
Status: Inactive
Brought to you by:
grro
|
From: Gregor R. <gre...@gm...> - 2010-04-16 04:14:59
|
Hi Brad, this is a default behaviour of TCP. Setting the SO_REUSEADDR option overrides that behaviour. In this case the port will be reused port immediately. Map<String, Object> options = new HashMap<String, Object>(); options.put(IConnection.SO_REUSEADDR, true); Server server = new Server(0, options, new Handler()); Gregor > ----- Original Message ----- > From: Brad McEvoy > Sent: 04/16/10 12:50 AM > To: xso...@li... > Subject: [xSocket-develop] graceful shutdown > Hi Guys, Firstly, I'd like to say what really great technology xsocket is, it makes it very easy to do very cool things :) I'm having a problem getting xsocket to shutdown gracefully. I'm starting the server with ConnectionUtils.start( server ), and when the application is shutdown i'm calling server.close(). But the port continues to be in use so i can't restart my application - even after the java process has gone (which i didnt think was possible). Its very strange. I have to wait between 1 and 5 minutes before the socket becomes free and i can start the application again. This problem only seems to happen on my server which is running linux 2.6.16. There are no other process using that port (confirmed with netstat) Any ideas? Thanks, Brad ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ xSocket-develop mailing list xSo...@li... https://lists.sourceforge.net/lists/listinfo/xsocket-develop |