Changeset 8706 in josm for trunk/src/org


Ignore:
Timestamp:
2015-09-01T17:26:14+02:00 (5 years ago)
Author:
stoecker
Message:

improve IPv6 check (workaround for bad data from Java) - fix #11452

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/MainApplication.java

    r8674 r8706  
    1616import java.net.Inet6Address;
    1717import java.net.InetAddress;
     18import java.net.InetSocketAddress;
    1819import java.net.ProxySelector;
     20import java.net.Socket;
    1921import java.net.URL;
    2022import java.security.AllPermission;
     
    558560                            if (a instanceof Inet6Address) {
    559561                                if (a.isReachable(1000)) {
     562                                    /* be sure it REALLY works */
     563                                    Socket s = new Socket();
     564                                    s.connect(new InetSocketAddress(a, 80), 1000);
     565                                    s.close();
    560566                                    Utils.updateSystemProperty("java.net.preferIPv6Addresses", "true");
    561567                                    if (!wasv6) {
Note: See TracChangeset for help on using the changeset viewer.