Browse Source
Merge pull request #21786 from abpframework/GetHandlerFactories
Avoid HandlerFactories being changed during iteration.
pull/21788/head
Engincan VESKE
1 year ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
2 additions and
2 deletions
-
framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/EventBusBase.cs
|
|
|
@ -135,9 +135,9 @@ public abstract class EventBusBase : IEventBus |
|
|
|
{ |
|
|
|
await new SynchronizationContextRemover(); |
|
|
|
|
|
|
|
foreach (var handlerFactories in GetHandlerFactories(eventType)) |
|
|
|
foreach (var handlerFactories in GetHandlerFactories(eventType).ToList()) |
|
|
|
{ |
|
|
|
foreach (var handlerFactory in handlerFactories.EventHandlerFactories) |
|
|
|
foreach (var handlerFactory in handlerFactories.EventHandlerFactories.ToList()) |
|
|
|
{ |
|
|
|
await TriggerHandlerAsync(handlerFactory, handlerFactories.EventType, eventData, exceptions, inboxConfig); |
|
|
|
} |
|
|
|
|