Skip to content

Commit

Permalink
Fixed too early initialization of view compilation service
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasherceg committed Apr 27, 2024
1 parent 3eb97dd commit cbe4d5e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Framework/Hosting.AspNetCore/Hosting/DotvvmHealthCheck.cs
Expand Up @@ -47,14 +47,14 @@ public Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, Canc

public static void RegisterHealthCheck(IServiceCollection services)
{
services.ConfigureWithServices<HealthCheckServiceOptions>((options, s) => {
services.Configure<HealthCheckServiceOptions>(options => {
if (options.Registrations.Any(c => c.Name == "DotVVM"))
return;
options.Registrations.Add(
new HealthCheckRegistration(
"DotVVM",
ActivatorUtilities.CreateInstance<DotvvmHealthCheck>(s),
s => ActivatorUtilities.CreateInstance<DotvvmHealthCheck>(s),
null,
new [] { "dotvvm" }
)
Expand Down

0 comments on commit cbe4d5e

Please sign in to comment.