diff options
| author | JP Dillingham <jp@dillingham.me> | 2026-11-12 18:26:40 -0600 |
|---|---|---|
| committer | JP Dillingham <jp@dillingham.me> | 2026-11-12 18:26:40 -0600 |
| commit | a65269cc9163b1c83be426fbcf98fd529f44b789 (patch) | |
| tree | 8fad6668a695d26c8be4c34e7279960df4cabeb0 /src/slskd/Core/API/Controllers | |
| parent | e7245732ddae9222283fec370a96370036ba7a08 (diff) | |
| download | slskd-a65269cc9163b1c83be426fbcf98fd529f44b789.tar.gz | |
swallow object disposed when cancelling
Diffstat (limited to 'src/slskd/Core/API/Controllers')
| -rw-r--r-- | src/slskd/Core/API/Controllers/ApplicationController.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/slskd/Core/API/Controllers/ApplicationController.cs b/src/slskd/Core/API/Controllers/ApplicationController.cs index e015e612..09d9eda2 100644 --- a/src/slskd/Core/API/Controllers/ApplicationController.cs +++ b/src/slskd/Core/API/Controllers/ApplicationController.cs @@ -94,7 +94,7 @@ namespace slskd.Core.API [Authorize(Policy = AuthPolicy.JwtOnly, Roles = AuthRole.AdministratorOnly)] public IActionResult Shutdown() { - Program.MasterCancellationTokenSource.Cancel(); + Program.MasterCancellationTokenSource.Cancel(swallowObjectDisposedException: true); Lifetime.StopApplication(); Task.Run(async () => @@ -114,7 +114,7 @@ namespace slskd.Core.API [Authorize(Policy = AuthPolicy.JwtOnly, Roles = AuthRole.AdministratorOnly)] public IActionResult Restart() { - Program.MasterCancellationTokenSource.Cancel(); + Program.MasterCancellationTokenSource.Cancel(swallowObjectDisposedException: true); Process.Start(Process.GetCurrentProcess().MainModule.FileName, Environment.CommandLine); Lifetime.StopApplication(); |
