Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
colombod committed Sep 24, 2021
1 parent d3c09d0 commit 46ca3ae
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,14 @@ public async IAsyncEnumerable<CommandOrEvent> CommandsAndEventsAsync([Enumerator

await foreach (var commandOrEvent in _source.CommandsAndEventsAsync(cancellationToken))
{
var sources = Array.Empty<BlockingCollection<CommandOrEvent>>();
BlockingCollection<CommandOrEvent>[] sources;

lock (_children)
{
sources = _children.Select(c => c.LocalStorage).ToArray();
}
if (_children.Count > 0)

if (sources.Length > 0)
{
foreach (var destination in sources)
{
Expand Down

0 comments on commit 46ca3ae

Please sign in to comment.