aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/ApplicationHost.cs
diff options
context:
space:
mode:
authorJoshua Boniface <joshua@boniface.me>2019-09-29 17:17:19 -0400
committerJoshua Boniface <joshua@boniface.me>2019-09-29 17:17:19 -0400
commit387192610f5aca62e691dfe2dfed92a5889c6cd7 (patch)
tree503e0c99907b2b9a91eef3febee72d16e1e9176f /Emby.Server.Implementations/ApplicationHost.cs
parentcabb9aed3142773ab3bec4627b2aec3dc470f02e (diff)
Handle Kestrel startup failures with a nice error
Diffstat (limited to 'Emby.Server.Implementations/ApplicationHost.cs')
-rw-r--r--Emby.Server.Implementations/ApplicationHost.cs10
1 files changed, 9 insertions, 1 deletions
diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs
index 5719c5e46..d22f2be81 100644
--- a/Emby.Server.Implementations/ApplicationHost.cs
+++ b/Emby.Server.Implementations/ApplicationHost.cs
@@ -663,7 +663,15 @@ namespace Emby.Server.Implementations
})
.Build();
- await host.StartAsync().ConfigureAwait(false);
+ try
+ {
+ await host.StartAsync().ConfigureAwait(false);
+ }
+ catch (Exception ex)
+ {
+ Logger.LogError("Kestrel failed to start! This is most likely due to an invalid address or port bind - correct your bind configuration in system.xml and try again.");
+ throw;
+ }
}
private async Task ExecuteWebsocketHandlerAsync(HttpContext context, Func<Task> next)