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

This commit is contained in:
gtully 2015-02-11 15:51:55 +00:00 committed by Hadrian Zbarcea
parent b4e6cb6af5
commit bd1226b60c
1 changed files with 10 additions and 8 deletions

View File

@ -344,6 +344,7 @@ public class MulticastDiscoveryAgent implements DiscoveryAgent, Runnable {
List<NetworkInterface> possibles = new ArrayList<NetworkInterface>(); List<NetworkInterface> possibles = new ArrayList<NetworkInterface>();
while (ifcs.hasMoreElements()) { while (ifcs.hasMoreElements()) {
NetworkInterface ni = ifcs.nextElement(); NetworkInterface ni = ifcs.nextElement();
try {
if (ni.supportsMulticast() if (ni.supportsMulticast()
&& ni.isUp()) { && ni.isUp()) {
for (InterfaceAddress ia : ni.getInterfaceAddresses()) { for (InterfaceAddress ia : ni.getInterfaceAddresses()) {
@ -354,6 +355,7 @@ public class MulticastDiscoveryAgent implements DiscoveryAgent, Runnable {
} }
} }
} }
} catch (SocketException ignored) {}
} }
return possibles.isEmpty() ? null : possibles.get(possibles.size() - 1); return possibles.isEmpty() ? null : possibles.get(possibles.size() - 1);
} }