diff options
| author | JP Dillingham <jpdillingham@gmail.com> | 2022-09-24 16:21:20 -0500 |
|---|---|---|
| committer | JP Dillingham <jpdillingham@gmail.com> | 2022-09-24 16:21:20 -0500 |
| commit | db73de70aa1e3d28707da66271b9962046ebcc8c (patch) | |
| tree | af087b4fa9d4c0393ed601ec483fd44e6024322a /src/slskd/Core/API/Controllers/ApplicationController.cs | |
| parent | 721a1436960746df84410cfb4b6626f50df62f43 (diff) | |
| download | slskd-db73de70aa1e3d28707da66271b9962046ebcc8c.tar.gz | |
cancel master token on shutdown and reboot
Diffstat (limited to 'src/slskd/Core/API/Controllers/ApplicationController.cs')
| -rw-r--r-- | src/slskd/Core/API/Controllers/ApplicationController.cs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/slskd/Core/API/Controllers/ApplicationController.cs b/src/slskd/Core/API/Controllers/ApplicationController.cs index ac8be802..7fb914e9 100644 --- a/src/slskd/Core/API/Controllers/ApplicationController.cs +++ b/src/slskd/Core/API/Controllers/ApplicationController.cs @@ -72,6 +72,7 @@ namespace slskd.Core.API [Authorize] public IActionResult Shutdown() { + Program.MasterCancellationTokenSource.Cancel(); Lifetime.StopApplication(); Task.Run(async () => @@ -91,6 +92,7 @@ namespace slskd.Core.API [Authorize] public IActionResult Restart() { + Program.MasterCancellationTokenSource.Cancel(); Process.Start(Process.GetCurrentProcess().MainModule.FileName, Environment.CommandLine); Lifetime.StopApplication(); |
