diff --git a/src/Connected.Host/ConnectedPlatformService.cs b/src/Connected.Host/ConnectedPlatformService.cs index 3c09412..c0ff65d 100644 --- a/src/Connected.Host/ConnectedPlatformService.cs +++ b/src/Connected.Host/ConnectedPlatformService.cs @@ -18,7 +18,7 @@ internal sealed class ConnectedPlatformService : BackgroundService protected override async Task ExecuteAsync(CancellationToken stoppingToken) { if (GlobalConfig.GetValue("waitForDebugger")) - while (!Debugger.IsAttached) + while (!Debugger.IsAttached && !stoppingToken.IsCancellationRequested) await Task.Delay(500); await DependencyLoader.LoadPackages(Config.MicroServices, Config.Repositories);