Skip to content

Commit

Permalink
Merge pull request #5 from epsitec/patch-1
Browse files Browse the repository at this point in the history
Fix try/finally block
  • Loading branch information
myquay authored Sep 24, 2024
2 parents a0cf256 + c0ff7e5 commit 341f752
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,9 @@ public async Task Invoke(HttpContext context)
httpContextAccessor.HttpContext ??= context;

//Replace the service providers feature with our tenant specific one
IServiceProvidersFeature existingFeature = null!;
IServiceProvidersFeature? existingFeature = context.Features.Get<IServiceProvidersFeature>();
try
{
existingFeature = context.Features.Get<IServiceProvidersFeature>()!;
context.Features.Set<IServiceProvidersFeature>(new RequestServicesFeature(context, multiTenantServiceProviderScopeFactory));
await next.Invoke(context);
}
Expand Down

0 comments on commit 341f752

Please sign in to comment.