Browse Source

Use `AsyncHelper` for `ShutdownAsync`.

pull/10928/head
maliming 5 years ago
parent
commit
59284b463a
No known key found for this signature in database GPG Key ID: 96224957E51C89E
  1. 3
      framework/src/Volo.Abp.AspNetCore/Microsoft/AspNetCore/Builder/AbpApplicationBuilderExtensions.cs

3
framework/src/Volo.Abp.AspNetCore/Microsoft/AspNetCore/Builder/AbpApplicationBuilderExtensions.cs

@ -12,6 +12,7 @@ using Volo.Abp.AspNetCore.Security.Claims;
using Volo.Abp.AspNetCore.Tracing; using Volo.Abp.AspNetCore.Tracing;
using Volo.Abp.AspNetCore.Uow; using Volo.Abp.AspNetCore.Uow;
using Volo.Abp.DependencyInjection; using Volo.Abp.DependencyInjection;
using Volo.Abp.Threading;
namespace Microsoft.AspNetCore.Builder; namespace Microsoft.AspNetCore.Builder;
@ -29,7 +30,7 @@ public static class AbpApplicationBuilderExtensions
applicationLifetime.ApplicationStopping.Register(() => applicationLifetime.ApplicationStopping.Register(() =>
{ {
application.ShutdownAsync(); AsyncHelper.RunSync(() => application.ShutdownAsync());
}); });
applicationLifetime.ApplicationStopped.Register(() => applicationLifetime.ApplicationStopped.Register(() =>

Loading…
Cancel
Save