From 520aeb9a8ec322582a86be3f52e31d569c406d47 Mon Sep 17 00:00:00 2001 From: Bond_009 Date: Mon, 20 Sep 2021 22:27:20 +0200 Subject: [PATCH] Allow shutdown while starting WebHost --- Jellyfin.Server/Program.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jellyfin.Server/Program.cs b/Jellyfin.Server/Program.cs index 3c0ee069d4..1300ce3b67 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;