mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 07:42:57 +08:00
Fix windows updater showing false failures
This commit is contained in:
parent
02541ee6e5
commit
d557737143
@ -1,4 +1,4 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System;
|
||||
@ -46,7 +46,7 @@ namespace osu.Desktop.Updater
|
||||
private async void checkForUpdateAsync(bool useDeltaPatching = true, UpdateProgressNotification notification = null)
|
||||
{
|
||||
//should we schedule a retry on completion of this check?
|
||||
bool scheduleRetry = true;
|
||||
bool scheduleRecheck = true;
|
||||
|
||||
try
|
||||
{
|
||||
@ -86,10 +86,12 @@ namespace osu.Desktop.Updater
|
||||
//could fail if deltas are unavailable for full update path (https://github.com/Squirrel/Squirrel.Windows/issues/959)
|
||||
//try again without deltas.
|
||||
checkForUpdateAsync(false, notification);
|
||||
scheduleRetry = false;
|
||||
scheduleRecheck = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (notification != null)
|
||||
notification.State = ProgressNotificationState.Cancelled;
|
||||
Logger.Error(e, @"update failed!");
|
||||
}
|
||||
}
|
||||
@ -100,11 +102,8 @@ namespace osu.Desktop.Updater
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (scheduleRetry)
|
||||
if (scheduleRecheck)
|
||||
{
|
||||
if (notification != null)
|
||||
notification.State = ProgressNotificationState.Cancelled;
|
||||
|
||||
//check again in 30 minutes.
|
||||
Scheduler.AddDelayed(() => checkForUpdateAsync(), 60000 * 30);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user