Add check for application shutdown when waiting for debugger

features/nuget_autobuild
Matija Koželj 2 years ago
parent 9d22093165
commit 3dc20a9325

@ -18,7 +18,7 @@ internal sealed class ConnectedPlatformService : BackgroundService
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
{
if (GlobalConfig.GetValue<bool>("waitForDebugger"))
while (!Debugger.IsAttached)
while (!Debugger.IsAttached && !stoppingToken.IsCancellationRequested)
await Task.Delay(500);
await DependencyLoader.LoadPackages(Config.MicroServices, Config.Repositories);

Loading…
Cancel
Save