Commit a5b7b420 authored by Matt Tucker's avatar Matt Tucker Committed by matt

One more improvement -- write the update time even if there is an error to prevent a fast loop.

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@4703 b35dd754-fafc-0310-a699-88a17e54d16e
parent 1c30e8de
...@@ -109,22 +109,22 @@ public class UpdateManager extends BasicModule { ...@@ -109,22 +109,22 @@ public class UpdateManager extends BasicModule {
checkForServerUpdate(true); checkForServerUpdate(true);
// Refresh list of available plugins and check for plugin updates // Refresh list of available plugins and check for plugin updates
checkForPluginsUpdates(true); checkForPluginsUpdates(true);
// Keep track of the last time we checked for updates
long now = System.currentTimeMillis();
JiveGlobals.setProperty("update.lastCheck", String.valueOf(now));
// As an extra precaution, make sure that that the value
// we just set is saved. If not, return to make sure that
// no additional update checks are performed until Wildfire
// is restarted.
if (now != JiveGlobals.getLongProperty("update.lastCheck", 0)) {
Log.error("Error: update service check did not save correctly. " +
"Stopping update service.");
return;
}
} }
catch (Exception e) { catch (Exception e) {
Log.error("Error checking for updates", e); Log.error("Error checking for updates", e);
} }
// Keep track of the last time we checked for updates.
long now = System.currentTimeMillis();
JiveGlobals.setProperty("update.lastCheck", String.valueOf(now));
// As an extra precaution, make sure that that the value
// we just set is saved. If not, return to make sure that
// no additional update checks are performed until Wildfire
// is restarted.
if (now != JiveGlobals.getLongProperty("update.lastCheck", 0)) {
Log.error("Error: update service check did not save correctly. " +
"Stopping update service.");
return;
}
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment