Skip to content

Commit

Permalink
Fix update check not triggered
Browse files Browse the repository at this point in the history
This applies to new installations only, where we expect the check to
happen immediately on the second run.

If the LastCheckTime registry value was not set, it would default to
current time, meaning that a check wouldn't happen until after the
interval passed. If the user always closes the app before reaching the
interval, then a check would never happen.

This simply reverts back to previous behavior. Give LastCheckTime a
default value of 0 so that a check happens immediately if there's
been no previous check.
  • Loading branch information
cloudshao authored and vslavik committed Jul 31, 2017
1 parent dbf9749 commit c9f219e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/updatechecker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ void UpdateChecker::Run()
if (checkUpdates)
{
const time_t currentTime = time(NULL);
time_t lastCheck = currentTime;
time_t lastCheck = 0;
Settings::ReadConfigValue("LastCheckTime", lastCheck);

// Only check for updates in reasonable intervals:
Expand Down

0 comments on commit c9f219e

Please sign in to comment.