[EMAIL PROTECTED] wrote:
Author: jim

Modified: tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=596761&r1=596760&r2=596761&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Tue 
Nov 20 10:19:00 2007
@@ -858,7 +858,7 @@
         try {
             // Need to create a connection to unlock the accept();
             if (address == null) {
-                s = new java.net.Socket("127.0.0.1", port);
+                s = new 
java.net.Socket(InetAddress.getByName("localhost").getHostAddress(), port);

Although fine related to the localhost address, this will need to get changed.
The problem is with IPV6 cause in case the bind address is IPV6 the
unlock should be "s = new java.net.Socket("::1", port);"
On some platforms APR doesn't listen on IPV4 and IPV6 like FreeBSD and Windows.

It's not something related to this patch but something related to the
concept itself.
The best approach for unlock IMO would be to use the actual bind address,
but again there is a problem with NULL for IPV4/IPV6 and the fact that
we'd need to figure out the IP for each of them (localhost).

Regards,
Mladen

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to