Skip to content
Snippets Groups Projects
Commit b45a2786 authored by damonkohler's avatar damonkohler
Browse files

Merge pull request #165 from HiroyukiMikita/hydro-devel

fixed to check if network interface is up or not
parents db09d9bc c5162a5c
No related branches found
No related tags found
No related merge requests found
......@@ -52,8 +52,14 @@ public class InetAddressFactory {
}
List<InetAddress> inetAddresses = Lists.newArrayList();
for (NetworkInterface networkInterface : networkInterfaces) {
try {
if (networkInterface.isUp()) {
inetAddresses.addAll(Collections.list(networkInterface.getInetAddresses()));
}
} catch (SocketException e) {
throw new RosRuntimeException(e);
}
}
return inetAddresses;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment