tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dawkins, David" <david.dawk...@brooks-pri.com>
Subject Proposed/suggested change to DefaultServerSocketFactory
Date Mon, 02 Sep 2002 13:54:20 GMT
Hi,

Re: class org.apache.tomcat.util.net.DefaultServerSocketFactory

On Solaris 2.8, if I stop and restart tomcat (4.0.4 w/ jdk1.4)
I get bind exceptions on the ports for the HTTP and WARP connectors.

I usually fix this type of problem by setting SO_REUSEADDR. So,
I wondered about changing code like:

	return new ServerSocket(port);

to 

	ServerSocket ss = new ServerSocket();
	ss.setReuseAddress( /*on=*/ true );
	ss.bind( new InetSocketAddress(port) );
	return ss;

Any comments?  I will test the fix tomorrow, but I'm not sure what then
to do with the patch if it (a) works and (b) is approved by you lot.

Thanks and regards,

David Dawkins
Brooks-PRI Automation





--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message