Only read the value from the configuration after not resetting.
[Sone.git] / src / main / java / net / pterodactylus / sone / core / Core.java
index 49cbc8a..4fe969d 100644 (file)
@@ -626,7 +626,7 @@ public class Core extends AbstractService {
                                SoneInserter.setInsertionDelay(newValue);
                        }
 
-               })).set(configuration.getIntValue("Option/InsertionDelay").getValue(null));
+               }));
 
                options.addBooleanOption("ClearOnNextRestart", new DefaultOption<Boolean>(false)).set(configuration.getBooleanValue("Option/ClearOnNextRestart").getValue(null));
                options.addBooleanOption("ReallyClearOnNextRestart", new DefaultOption<Boolean>(false)).set(configuration.getBooleanValue("Option/ReallyClearOnNextRestart").getValue(null));
@@ -639,6 +639,8 @@ public class Core extends AbstractService {
                        return;
                }
 
+               options.getIntegerOption("InsertionDelay").set(configuration.getIntValue("Option/InsertionDelay").getValue(null));
+
                /* parse local Sones. */
                logger.log(Level.INFO, "Loading Sones…");
                int soneId = 0;