activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject activemq git commit: https://issues.apache.org/jira/browse/AMQ-5520 - fix org.apache.activemq.spring.SpringTest.testSenderWithSpringXmlEmbeddedPooledBrokerConfiguredViaXml regression
Date Wed, 11 Feb 2015 15:51:25 GMT
Repository: activemq
Updated Branches:
  refs/heads/master 25376afac -> 07338e755


https://issues.apache.org/jira/browse/AMQ-5520 - fix org.apache.activemq.spring.SpringTest.testSenderWithSpringXmlEmbeddedPooledBrokerConfiguredViaXml
regression


Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/07338e75
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/07338e75
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/07338e75

Branch: refs/heads/master
Commit: 07338e7553279aff45ac2b13ec8ea19f98c9069a
Parents: 25376af
Author: gtully <gary.tully@gmail.com>
Authored: Wed Feb 11 15:51:55 2015 +0000
Committer: gtully <gary.tully@gmail.com>
Committed: Wed Feb 11 15:51:55 2015 +0000

----------------------------------------------------------------------
 .../multicast/MulticastDiscoveryAgent.java        | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/07338e75/activemq-client/src/main/java/org/apache/activemq/transport/discovery/multicast/MulticastDiscoveryAgent.java
----------------------------------------------------------------------
diff --git a/activemq-client/src/main/java/org/apache/activemq/transport/discovery/multicast/MulticastDiscoveryAgent.java
b/activemq-client/src/main/java/org/apache/activemq/transport/discovery/multicast/MulticastDiscoveryAgent.java
index 345ffdb..48b15e2 100755
--- a/activemq-client/src/main/java/org/apache/activemq/transport/discovery/multicast/MulticastDiscoveryAgent.java
+++ b/activemq-client/src/main/java/org/apache/activemq/transport/discovery/multicast/MulticastDiscoveryAgent.java
@@ -344,16 +344,18 @@ public class MulticastDiscoveryAgent implements DiscoveryAgent, Runnable
{
         List<NetworkInterface> possibles = new ArrayList<NetworkInterface>();
         while (ifcs.hasMoreElements()) {
             NetworkInterface ni = ifcs.nextElement();
-            if (ni.supportsMulticast()
-                && ni.isUp()) {
-                for (InterfaceAddress ia : ni.getInterfaceAddresses()) {
-                    if (ia.getAddress() instanceof java.net.Inet4Address
-                        && !ia.getAddress().isLoopbackAddress()
-                        && !ni.getDisplayName().startsWith("vnic")) {
-                        possibles.add(ni);
+            try {
+                if (ni.supportsMulticast()
+                        && ni.isUp()) {
+                    for (InterfaceAddress ia : ni.getInterfaceAddresses()) {
+                        if (ia.getAddress() instanceof java.net.Inet4Address
+                                && !ia.getAddress().isLoopbackAddress()
+                                && !ni.getDisplayName().startsWith("vnic")) {
+                            possibles.add(ni);
+                        }
                     }
                 }
-            }
+            } catch (SocketException ignored) {}
         }
         return possibles.isEmpty() ? null : possibles.get(possibles.size() - 1);
     }


Mime
View raw message