aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaus Vium <cvium@users.noreply.github.com>2021-09-20 23:40:58 +0200
committerGitHub <noreply@github.com>2021-09-20 23:40:58 +0200
commit9bb222b4085e3f9e9ec946e8e134bbe77df26e86 (patch)
tree75d7a52693dedd5b11ed6b323b39f34f02bd9d8d
parent747d464be34792a9f43a8deec168927ad5923e5d (diff)
parent520aeb9a8ec322582a86be3f52e31d569c406d47 (diff)
Merge pull request #6582 from Bond-009/shutdown
Allow shutdown while starting WebHost
-rw-r--r--Jellyfin.Server/Program.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Jellyfin.Server/Program.cs b/Jellyfin.Server/Program.cs
index 3c0ee069d..1300ce3b6 100644
--- a/Jellyfin.Server/Program.cs
+++ b/Jellyfin.Server/Program.cs
@@ -195,9 +195,9 @@ namespace Jellyfin.Server
try
{
- await webHost.StartAsync().ConfigureAwait(false);
+ await webHost.StartAsync(_tokenSource.Token).ConfigureAwait(false);
}
- catch
+ catch (Exception ex) when (ex is not TaskCanceledException)
{
_logger.LogError("Kestrel failed to start! This is most likely due to an invalid address or port bind - correct your bind configuration in network.xml and try again.");
throw;