http in development mode crashed -

pull/2969/head
Admin 5 years ago
parent aa6d52277d
commit d1684b1053

@ -272,8 +272,9 @@ namespace Jellyfin.Server
{ {
_logger.LogInformation("Kestrel listening on {IpAddress}", address); _logger.LogInformation("Kestrel listening on {IpAddress}", address);
options.Listen(address, appHost.HttpPort); options.Listen(address, appHost.HttpPort);
if (appHost.EnableHttps)
if (appHost.EnableHttps && appHost.Certificate != null) {
if (appHost.Certificate != null)
{ {
options.Listen(address, appHost.HttpsPort, listenOptions => options.Listen(address, appHost.HttpsPort, listenOptions =>
{ {
@ -291,12 +292,15 @@ namespace Jellyfin.Server
} }
} }
} }
}
else else
{ {
_logger.LogInformation("Kestrel listening on all interfaces"); _logger.LogInformation("Kestrel listening on all interfaces");
options.ListenAnyIP(appHost.HttpPort); options.ListenAnyIP(appHost.HttpPort);
if (appHost.EnableHttps && appHost.Certificate != null) if (appHost.EnableHttps)
{
if (appHost.Certificate != null)
{ {
options.ListenAnyIP(appHost.HttpsPort, listenOptions => options.ListenAnyIP(appHost.HttpsPort, listenOptions =>
{ {
@ -313,6 +317,7 @@ namespace Jellyfin.Server
}); });
} }
} }
}
}) })
.ConfigureAppConfiguration(config => config.ConfigureAppConfiguration(commandLineOpts, appPaths, startupConfig)) .ConfigureAppConfiguration(config => config.ConfigureAppConfiguration(commandLineOpts, appPaths, startupConfig))
.UseSerilog() .UseSerilog()

Loading…
Cancel
Save