jean-frederic clere wrote:
[EMAIL PROTECTED] wrote:
Author: jim
Date: Tue Nov 20 10:19:00 2007
New Revision: 596761
URL: http://svn.apache.org/viewvc?rev=596761&view=rev
Log:
Fix BZ 43588 - hard coded 127.0.0.1 for localhost
Modified:
tomcat/tc6.0.x/trunk/STATUS.txt
tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardServer.java
tomcat/tc6.0.x/trunk/java/org/apache/catalina/startup/Catalina.java
tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/BaseEndpoint.java
tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java
tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/PoolTcpEndpoint.java
tomcat/tc6.0.x/trunk/res/tomcat.nsi
Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/startup/Catalina.java
URL:
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/startup/Catalina.java?rev=596761&r1=596760&r2=596761&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/startup/Catalina.java
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/startup/Catalina.java Tue Nov
20 10:19:00 2007
@@ -24,6 +24,7 @@
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
+import java.net.InetAddress;
import java.net.Socket;
import java.util.ArrayList;
import java.util.HashMap;
@@ -416,7 +417,8 @@
// Stop the existing server
try {
- Socket socket = new Socket("127.0.0.1", server.getPort());
+ String hostAddress =
InetAddress.getByName("localhost").getHostAddress();
+ Socket socket = new Socket(hostAddress, server.getPort());
Why not using Socket socket = new Socket("localhost", server.getPort()); ?
:) save one line
there is no difference, the Socket class will do the exact same translation.
same code will get executed
Filip
Cheers
Jean-Frederic
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]