Skip to content
This repository was archived by the owner on Dec 22, 2019. It is now read-only.

Commit d995d25

Browse files
committed
Fix compilation error
1 parent d08161c commit d995d25

3 files changed

Lines changed: 8 additions & 2 deletions

File tree

UpdateLib/TestApp/Form1.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ private void checkForUpdatesToolStripMenuItem_Click(object sender, EventArgs e)
6161
checkForUpdatesToolStripMenuItem.Enabled = false;
6262

6363
AsyncTask task = Updater.Instance.CheckForUpdatesAsync();
64-
task.Cancel();
64+
//task.Cancel();
6565
}
6666

6767
private void Form1_Load(object sender, EventArgs e)

UpdateLib/UpdateLib/Tasks/CheckForUpdatesTask.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,10 @@ protected override void DoWork()
4141
return;
4242

4343
if (IsUpdateFileInvalid(localFile))
44+
{
45+
Updater.Instance.Logger.Warn(GetType().Name, "Cached update file validity expired, downloading new one..");
4446
wcDownloader.DownloadFile(Url, localFile);
47+
}
4548

4649
// load the updatefile from disk
4750
Result.UpdateFile = UpdateFile.Load(localFile);

UpdateLib/UpdateLib/Updater.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,10 @@ public CheckForUpdatesTask CheckForUpdatesAsync(IWin32Window owner)
424424
Logger.Error(GetType().Name, e.Error);
425425

426426
if (!update)
427-
Logger.Info()
427+
Logger.Info(GetType().Name, "No update available");
428+
429+
if (cancelled)
430+
Logger.Info(GetType().Name, "Update cancalled");
428431

429432
if (!UpdateSilently)
430433
MessageDialog.Show(

0 commit comments

Comments
 (0)