forked from I2P_Developers/i2p.i2p
- Use new synchronized change-and-save-config methods
to eliminate races with ReadConfigJob
This commit is contained in:
@@ -53,18 +53,11 @@ public class ConfigAdvancedHandler extends FormHandler {
|
||||
return;
|
||||
}
|
||||
|
||||
for (Map.Entry e : props.entrySet()) {
|
||||
String key = (String) e.getKey();
|
||||
String val = (String) e.getValue();
|
||||
_context.router().setConfigSetting(key, val);
|
||||
for (Object key : props.keySet()) {
|
||||
unsetKeys.remove(key);
|
||||
}
|
||||
|
||||
for (String unsetKey : unsetKeys) {
|
||||
_context.router().removeConfigSetting(unsetKey);
|
||||
}
|
||||
|
||||
boolean saved = _context.router().saveConfig();
|
||||
boolean saved = _context.router().saveConfig(props, unsetKeys);
|
||||
if (saved)
|
||||
addFormNotice(_("Configuration saved successfully"));
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user