aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server/Program.cs
diff options
context:
space:
mode:
authorBond_009 <bond.009@outlook.com>2021-09-20 22:27:20 +0200
committerBond_009 <bond.009@outlook.com>2021-09-20 22:27:20 +0200
commit520aeb9a8ec322582a86be3f52e31d569c406d47 (patch)
tree2e4b096ea9f2c8d9bd740d456d6cef86894ae2a7 /Jellyfin.Server/Program.cs
parent1b0e6b871b65a20a550dde388873a8bf44eb8096 (diff)
Allow shutdown while starting WebHost
Diffstat (limited to 'Jellyfin.Server/Program.cs')
-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;