Skip to content

Commit

Permalink
For WinExe, expicitly exit after Avalonia dispatcher shutdown.
Browse files Browse the repository at this point in the history
  • Loading branch information
bitbound committed Sep 11, 2023
1 parent 38dde6f commit e3692c7
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions Desktop.Win/Program.cs
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
using System.Threading.Tasks;
using System.Threading;
using System;
using Avalonia;
using Desktop.Shared.Services;
using Immense.RemoteControl.Desktop.Shared.Services;
using Immense.RemoteControl.Desktop.Shared.Startup;
using Immense.RemoteControl.Desktop.UI;
using Immense.RemoteControl.Desktop.UI.Services;
using Immense.RemoteControl.Desktop.Windows.Startup;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Remotely.Shared.Services;
using Immense.RemoteControl.Desktop.Shared.Services;
using System.Diagnostics;
using Remotely.Shared.Utilities;
using Immense.RemoteControl.Desktop.Shared.Startup;
using System;
using System.Diagnostics;
using System.Linq;
using Immense.RemoteControl.Desktop.Windows.Startup;
using Immense.RemoteControl.Desktop.UI.Services;
using Avalonia;
using Immense.RemoteControl.Desktop.UI;
using Desktop.Shared.Services;
using System.Runtime.Versioning;
using System.Threading;
using System.Threading.Tasks;

namespace Remotely.Desktop.Win;

Expand Down Expand Up @@ -99,5 +99,8 @@ public static async Task Main(string[] args)
await Task.Delay(Timeout.InfiniteTimeSpan, dispatcher.ApplicationExitingToken);
}
catch (TaskCanceledException) { }

// Output type is WinExe, so we need to explicitly exit.
Environment.Exit(0);
}
}

0 comments on commit e3692c7

Please sign in to comment.