Skip to content

Commit

Permalink
put a try limit to process closing for updater
Browse files Browse the repository at this point in the history
  • Loading branch information
Aytackydln committed May 23, 2024
1 parent fb74610 commit bb52727
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Project-Aurora/Aurora-Updater/UpdateManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ public class UpdateManager
private readonly AuroraInterface _auroraInterface = new();
public UpdateInfo UpdateInfo { get; }

private int _processQuitTries = 8;

public UpdateManager(Version version, string author, string repoName)
{
UpdaterConfiguration config;
Expand Down Expand Up @@ -394,6 +396,10 @@ private bool ExtractUpdate()
}
catch (IOException e)
{
if (_processQuitTries-- == 0)
{
throw;
}
if (fileEntry.FullName.Contains("/AuroraDeviceManager/"))
{
var processClosed = ShutdownDeviceManager().Result;
Expand Down

0 comments on commit bb52727

Please sign in to comment.