Changeset db86850


Ignore:
Timestamp:
Dec 13, 2015 4:40:42 PM (4 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
2155347
Parents:
97ae1e50
Message:

Addresses: Catch a rare (Windows only? IPv6 only?) error
when enumerating network interfaces

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • core/java/src/net/i2p/util/Addresses.java

    r97ae1e50 rdb86850  
    132132                }
    133133            }
    134         } catch (SocketException e) {}
     134        } catch (SocketException e) {
     135        } catch (java.lang.Error e) {
     136            // Windows, possibly when IPv6 only...
     137            // https://bugs.openjdk.java.net/browse/JDK-8046500
     138            // java.lang.Error: IP Helper Library GetIfTable function failed
     139            //   at java.net.NetworkInterface.getAll(Native Method)
     140            //   at java.net.NetworkInterface.getNetworkInterfaces(Unknown Source)
     141            //   at net.i2p.util.Addresses.getAddresses ...
     142        }
    135143
    136144        if (includeLoopbackAndWildcard) {
  • router/java/src/net/i2p/router/transport/udp/MTU.java

    r97ae1e50 rdb86850  
    4040            ifcs = NetworkInterface.getNetworkInterfaces();
    4141        } catch (SocketException se) {
     42            return 0;
     43        } catch (java.lang.Error e) {
     44            // Windows, possibly when IPv6 only...
     45            // https://bugs.openjdk.java.net/browse/JDK-8046500
     46            // java.lang.Error: IP Helper Library GetIfTable function failed
     47            //   at java.net.NetworkInterface.getAll(Native Method)
     48            //   at java.net.NetworkInterface.getNetworkInterfaces(Unknown Source)
     49            //   at net.i2p.util.Addresses.getAddresses ...
    4250            return 0;
    4351        }
Note: See TracChangeset for help on using the changeset viewer.