Permalink
Browse files

getHardwareAddress() returns null on failure

  • Loading branch information...
1 parent 27f16ad commit 17235ac0d1240497df1cdcb3cb0a6c6a05ff1c5d @bubbleguuum bubbleguuum committed Apr 25, 2012
@@ -130,8 +130,9 @@ public int getStreamListenPort() {
try {
NetworkInterface iface = NetworkInterface.getByInetAddress(inetAddress);
return iface != null ? iface.getHardwareAddress() : null;
- } catch (SocketException ex) {
- throw new RuntimeException(ex);
+ } catch (Throwable ex) {
+ // seen on Win32: java.lang.Error: IP Helper Library GetIpAddrTable function failed
+ return null;
}
}

0 comments on commit 17235ac

Please sign in to comment.