Browse Source

Avoid `HandlerFactories` being changed during iteration.

Resolve #20625
pull/21786/head
maliming 2 years ago
parent
commit
e52bc821e1
No known key found for this signature in database GPG Key ID: A646B9CB645ECEA4
  1. 2
      framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/EventBusBase.cs

2
framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/EventBusBase.cs

@ -135,7 +135,7 @@ 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)
{

Loading…
Cancel
Save