commit use use CreateAsyncScope

This commit is contained in:
Tarun Jain 2023-03-27 23:48:14 +05:30
parent e9351bfb2c
commit d6ea0cbdf5
2 changed files with 2 additions and 2 deletions

View File

@ -241,7 +241,7 @@ public class EventBusRabbitMQ : IEventBus, IDisposable
if (_subsManager.HasSubscriptionsForEvent(eventName))
{
using var scope = _serviceProvider.CreateScope();
await using var scope = _serviceProvider.CreateAsyncScope();
var subscriptions = _subsManager.GetHandlersForEvent(eventName);
foreach (var subscription in subscriptions)
{

View File

@ -151,7 +151,7 @@ public class EventBusServiceBus : IEventBus, IAsyncDisposable
var processed = false;
if (_subsManager.HasSubscriptionsForEvent(eventName))
{
var scope = _serviceProvider.CreateScope();
await using var scope = _serviceProvider.CreateAsyncScope();
var subscriptions = _subsManager.GetHandlersForEvent(eventName);
foreach (var subscription in subscriptions)
{