aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server/Program.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Jellyfin.Server/Program.cs')
-rw-r--r--Jellyfin.Server/Program.cs12
1 files changed, 8 insertions, 4 deletions
diff --git a/Jellyfin.Server/Program.cs b/Jellyfin.Server/Program.cs
index fab584bef..049dd761b 100644
--- a/Jellyfin.Server/Program.cs
+++ b/Jellyfin.Server/Program.cs
@@ -36,7 +36,7 @@ namespace Jellyfin.Server
private static bool _restartOnShutdown;
private static IConfiguration appConfig;
- public static async Task Main(string[] args)
+ public static Task Main(string[] args)
{
// For backwards compatibility.
// Modify any input arguments now which start with single-hyphen to POSIX standard
@@ -50,8 +50,8 @@ namespace Jellyfin.Server
}
// Parse the command line arguments and either start the app or exit indicating error
- await Parser.Default.ParseArguments<StartupOptions>(args)
- .MapResult(StartApp, _ => Task.CompletedTask).ConfigureAwait(false);
+ return Parser.Default.ParseArguments<StartupOptions>(args)
+ .MapResult(StartApp, _ => Task.CompletedTask);
}
public static void Shutdown()
@@ -122,8 +122,12 @@ namespace Jellyfin.Server
// The default connection limit is 10 for ASP.NET hosted applications and 2 for all others.
ServicePointManager.DefaultConnectionLimit = Math.Max(96, ServicePointManager.DefaultConnectionLimit);
+// CA5359: Do Not Disable Certificate Validation
+#pragma warning disable CA5359
+
// Allow all https requests
ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(delegate { return true; });
+#pragma warning restore CA5359
var fileSystem = new ManagedFileSystem(_loggerFactory, appPaths);
@@ -368,7 +372,7 @@ namespace Jellyfin.Server
}
catch (Exception ex)
{
- _logger.LogInformation(ex, "Skia not available. Will fallback to NullIMageEncoder. {0}");
+ _logger.LogInformation(ex, "Skia not available. Will fallback to NullIMageEncoder.");
}
return new NullImageEncoder();