Skip to content

Commit

Permalink
Fix quitting UniGetUI creating a nonexistent process
Browse files Browse the repository at this point in the history
  • Loading branch information
marticliment committed Feb 8, 2025
1 parent 5056bc7 commit a56af41
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/UniGetUI/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -400,12 +400,14 @@ public async Task ShowMainWindowFromLaunchAsync()

public async void DisposeAndQuit(int outputCode = 0)

Check warning on line 401 in src/UniGetUI/App.xaml.cs

View workflow job for this annotation

GitHub Actions / test-codebase

This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.
{
Logger.Warn("Quitting...");
Logger.Warn("Quitting UniGetUI");
DWMThreadHelper.ChangeState_DWM(false);
DWMThreadHelper.ChangeState_XAML(false);
MainWindow?.Close();
BackgroundApi?.Stop();
Exit();
await Task.Delay(100);
Environment.Exit(outputCode);
// await Task.Delay(100);
// Environment.Exit(outputCode);
}

public void KillAndRestart()
Expand Down

0 comments on commit a56af41

Please sign in to comment.