diff --git a/src/org/openstreetmap/josm/gui/MainApplication.java b/src/org/openstreetmap/josm/gui/MainApplication.java
index 79450865b7..c518a3430a 100644
|
a
|
b
|
import org.openstreetmap.josm.plugins.PluginInformation;
|
| 150 | 150 | import org.openstreetmap.josm.spi.lifecycle.InitStatusListener; |
| 151 | 151 | import org.openstreetmap.josm.spi.lifecycle.Lifecycle; |
| 152 | 152 | import org.openstreetmap.josm.spi.preferences.Config; |
| | 153 | import org.openstreetmap.josm.spi.preferences.IPreferences; |
| 153 | 154 | import org.openstreetmap.josm.tools.FontsManager; |
| 154 | 155 | import org.openstreetmap.josm.tools.GBC; |
| 155 | 156 | import org.openstreetmap.josm.tools.Http1Client; |
| … |
… |
public class MainApplication {
|
| 1300 | 1301 | hasv6 = false; |
| 1301 | 1302 | Logging.trace(e); |
| 1302 | 1303 | } |
| | 1304 | Config.getPref().putBoolean("validated.ipv6", hasv6); // be sure it is stored before the restart! |
| 1303 | 1305 | if (wasv6 && !hasv6) { |
| 1304 | 1306 | Logging.info(tr("Detected no usable IPv6 network, preferring IPv4 over IPv6 after next restart.")); |
| 1305 | | Config.getPref().putBoolean("validated.ipv6", hasv6); // be sure it is stored before the restart! |
| | 1307 | IPreferences iPreferences = Config.getPref(); |
| | 1308 | if (iPreferences instanceof Preferences) { |
| | 1309 | try { |
| | 1310 | // Force preferences to save |
| | 1311 | ((Preferences) iPreferences).save(); |
| | 1312 | Logging.trace("Preferences saved for IPv6"); |
| | 1313 | } catch (IOException e) { |
| | 1314 | throw new JosmRuntimeException(e); |
| | 1315 | } |
| | 1316 | } |
| 1306 | 1317 | RestartAction.restartJOSM(); |
| 1307 | 1318 | } |
| 1308 | | Config.getPref().putBoolean("validated.ipv6", hasv6); |
| 1309 | 1319 | }, "IPv6-checker").start(); |
| 1310 | 1320 | } |
| 1311 | 1321 | } |