diff options
| author | Bond-009 <bond.009@outlook.com> | 2023-10-03 11:05:10 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-03 11:05:10 +0200 |
| commit | 14b06ecbe29f6b9120048ea6d0b993778921a6a6 (patch) | |
| tree | bfbca697dbbeac2a02ca581c25d2affded681653 /Jellyfin.Api/Controllers/SystemController.cs | |
| parent | 1514b5d0523928b83e802d0e77ab074528b432e3 (diff) | |
| parent | ab0790271aac8846430c9689dff647eb4ce55078 (diff) | |
Merge pull request #10261 from barronpm/ihostlifetime
Diffstat (limited to 'Jellyfin.Api/Controllers/SystemController.cs')
| -rw-r--r-- | Jellyfin.Api/Controllers/SystemController.cs | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/Jellyfin.Api/Controllers/SystemController.cs b/Jellyfin.Api/Controllers/SystemController.cs index a29790961..42ac4a9b4 100644 --- a/Jellyfin.Api/Controllers/SystemController.cs +++ b/Jellyfin.Api/Controllers/SystemController.cs @@ -4,7 +4,6 @@ using System.ComponentModel.DataAnnotations; using System.IO; using System.Linq; using System.Net.Mime; -using System.Threading.Tasks; using Jellyfin.Api.Attributes; using Jellyfin.Api.Constants; using MediaBrowser.Common.Configuration; @@ -107,11 +106,7 @@ public class SystemController : BaseJellyfinApiController [ProducesResponseType(StatusCodes.Status403Forbidden)] public ActionResult RestartApplication() { - Task.Run(async () => - { - await Task.Delay(100).ConfigureAwait(false); - _appHost.Restart(); - }); + _appHost.Restart(); return NoContent(); } @@ -127,11 +122,7 @@ public class SystemController : BaseJellyfinApiController [ProducesResponseType(StatusCodes.Status403Forbidden)] public ActionResult ShutdownApplication() { - Task.Run(async () => - { - await Task.Delay(100).ConfigureAwait(false); - await _appHost.Shutdown().ConfigureAwait(false); - }); + _appHost.Shutdown(); return NoContent(); } |
