- Timestamp:
- 2022-06-14T08:46:54+02:00 (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/MainApplication.java
r18484 r18492 1277 1277 for (InetAddress b : InetAddress.getAllByName("api.openstreetmap.org")) { 1278 1278 if (b instanceof Inet6Address) { 1279 if (b.isReachable(1000)) {1280 1281 } else {1282 hasv6 = false;1283 }1279 //if (b.isReachable(1000)) { 1280 SSLSocketFactory.getDefault().createSocket(b, 443).close(); 1281 //} else { 1282 // hasv6 = false; 1283 //} 1284 1284 break; /* we're done */ 1285 1285 } 1286 1286 } 1287 Utils.updateSystemProperty("java.net.preferIPv6Addresses", "true"); 1288 if (!wasv6) { 1289 Logging.info(tr("Detected usable IPv6 network, preferring IPv6 over IPv4 after next restart.")); 1290 } else { 1291 Logging.info(tr("Detected usable IPv6 network, preferring IPv6 over IPv4.")); 1287 if(hasv6) { 1288 Utils.updateSystemProperty("java.net.preferIPv6Addresses", "true"); 1289 if (!wasv6) { 1290 Logging.info(tr("Detected usable IPv6 network, preferring IPv6 over IPv4 after next restart.")); 1291 } else { 1292 Logging.info(tr("Detected usable IPv6 network, preferring IPv6 over IPv4.")); 1293 } 1292 1294 } 1293 1295 } … … 1300 1302 Logging.trace(e); 1301 1303 } 1304 Config.getPref().putBoolean("validated.ipv6", hasv6); // be sure it is stored before the restart! 1302 1305 if (wasv6 && !hasv6) { 1303 1306 Logging.info(tr("Detected no usable IPv6 network, preferring IPv4 over IPv6 after next restart.")); 1304 Config.getPref().putBoolean("validated.ipv6", hasv6); // be sure it is stored before the restart!1305 1307 RestartAction.restartJOSM(); 1306 1308 } 1307 Config.getPref().putBoolean("validated.ipv6", hasv6);1308 1309 }, "IPv6-checker").start(); 1309 1310 }
Note:
See TracChangeset
for help on using the changeset viewer.