mirror of https://github.com/apache/activemq.git
https://issues.apache.org/jira/browse/AMQ-5520 - fix org.apache.activemq.spring.SpringTest.testSenderWithSpringXmlEmbeddedPooledBrokerConfiguredViaXml regression
This commit is contained in:
parent
25376afac1
commit
07338e7553
|
@ -344,16 +344,18 @@ 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();
|
||||||
if (ni.supportsMulticast()
|
try {
|
||||||
&& ni.isUp()) {
|
if (ni.supportsMulticast()
|
||||||
for (InterfaceAddress ia : ni.getInterfaceAddresses()) {
|
&& ni.isUp()) {
|
||||||
if (ia.getAddress() instanceof java.net.Inet4Address
|
for (InterfaceAddress ia : ni.getInterfaceAddresses()) {
|
||||||
&& !ia.getAddress().isLoopbackAddress()
|
if (ia.getAddress() instanceof java.net.Inet4Address
|
||||||
&& !ni.getDisplayName().startsWith("vnic")) {
|
&& !ia.getAddress().isLoopbackAddress()
|
||||||
possibles.add(ni);
|
&& !ni.getDisplayName().startsWith("vnic")) {
|
||||||
|
possibles.add(ni);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
} catch (SocketException ignored) {}
|
||||||
}
|
}
|
||||||
return possibles.isEmpty() ? null : possibles.get(possibles.size() - 1);
|
return possibles.isEmpty() ? null : possibles.get(possibles.size() - 1);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue