forked from I2P_Developers/i2p.i2p
Addresses: Catch a rare (Windows only? IPv6 only?) error
when enumerating network interfaces
This commit is contained in:
@ -40,6 +40,14 @@ abstract class MTU {
|
||||
ifcs = NetworkInterface.getNetworkInterfaces();
|
||||
} catch (SocketException se) {
|
||||
return 0;
|
||||
} catch (java.lang.Error e) {
|
||||
// Windows, possibly when IPv6 only...
|
||||
// https://bugs.openjdk.java.net/browse/JDK-8046500
|
||||
// java.lang.Error: IP Helper Library GetIfTable function failed
|
||||
// at java.net.NetworkInterface.getAll(Native Method)
|
||||
// at java.net.NetworkInterface.getNetworkInterfaces(Unknown Source)
|
||||
// at net.i2p.util.Addresses.getAddresses ...
|
||||
return 0;
|
||||
}
|
||||
if (ifcs != null) {
|
||||
while (ifcs.hasMoreElements()) {
|
||||
|
Reference in New Issue
Block a user