- Use new synchronized change-and-save-config methods

to eliminate races with ReadConfigJob
This commit is contained in:
zzz
2012-01-18 01:54:34 +00:00
parent 9755338f73
commit 95329803a9
20 changed files with 162 additions and 135 deletions

View File

@ -105,8 +105,7 @@ public class UnsignedUpdateHandler extends UpdateHandler {
modtime = RFC822Date.parse822Date(lastmod);
if (modtime <= 0)
modtime = _context.clock().now();
_context.router().setConfigSetting(PROP_LAST_UPDATE_TIME, "" + modtime);
_context.router().saveConfig();
_context.router().saveConfig(PROP_LAST_UPDATE_TIME, "" + modtime);
if ("install".equals(policy)) {
_log.log(Log.CRIT, "Update was downloaded, restarting to install it");
updateStatus("<b>" + _("Update downloaded") + "</b><br>" + _("Restarting"));