diff --git a/Oqtane.Server/Infrastructure/Jobs/HostedServiceBase.cs b/Oqtane.Server/Infrastructure/Jobs/HostedServiceBase.cs index 5c8fc04f..7f7f440a 100644 --- a/Oqtane.Server/Infrastructure/Jobs/HostedServiceBase.cs +++ b/Oqtane.Server/Infrastructure/Jobs/HostedServiceBase.cs @@ -46,6 +46,8 @@ namespace Oqtane.Infrastructure protected async Task ExecuteAsync(CancellationToken stoppingToken) { + await Task.Yield(); // required so that this method does not block startup + while (!stoppingToken.IsCancellationRequested) { using (var scope = _serviceScopeFactory.CreateScope())