diff --git a/ATI.Services.Consul/ConsulHostedService.cs b/ATI.Services.Consul/ConsulHostedService.cs index dc0b706..165b936 100644 --- a/ATI.Services.Consul/ConsulHostedService.cs +++ b/ATI.Services.Consul/ConsulHostedService.cs @@ -15,7 +15,7 @@ public class ConsulHostedService( { public Task StartAsync(CancellationToken ct) { - if (!bool.TryParse(ConfigurationManager.AppSettings("ConsulEnabled"), out var enabled) || !enabled) + if (bool.TryParse(ConfigurationManager.AppSettings("ConsulEnabled"), out var enabled) && !enabled) return Task.CompletedTask; Console.WriteLine("ConsulHostedService is starting.");