activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject svn commit: r983565 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpTransport.java
Date Mon, 09 Aug 2010 09:38:47 GMT
Author: gtully
Date: Mon Aug  9 09:38:46 2010
New Revision: 983565

URL: http://svn.apache.org/viewvc?rev=983565&view=rev
Log:
resolve: https://issues.apache.org/activemq/browse/AMQ-2776 - apply variant of patch. also
related to https://issues.apache.org/activemq/browse/AMQ-2771, avoid unnecessary local host
name resolution

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpTransport.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpTransport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpTransport.java?rev=983565&r1=983564&r2=983565&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpTransport.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpTransport.java
Mon Aug  9 09:38:46 2010
@@ -399,9 +399,9 @@ public class TcpTransport extends Transp
     // Implementation methods
     // -------------------------------------------------------------------------
     protected String resolveHostName(String host) throws UnknownHostException {
-        String localName = InetAddress.getLocalHost().getHostName();
-        if (localName != null && isUseLocalHost()) {
-            if (localName.equals(host)) {
+        if (isUseLocalHost()) {
+            String localName = InetAddress.getLocalHost().getHostName();
+            if (localName != null && localName.equals(host)) {
                 return "localhost";
             }
         }



Mime
View raw message