Skip to content

Commit

Permalink
list of connections
Browse files Browse the repository at this point in the history
  • Loading branch information
rysweet committed Nov 7, 2024
1 parent 915f23b commit ca06721
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions dotnet/src/Microsoft.AutoGen/Agents/Services/Gateway.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@ public async ValueTask BroadcastEvent(CloudEvent evt, CancellationToken cancella
{
// TODO: filter the workers that receive the event
var tasks = new List<Task>(_workers.Count);
foreach (var (_, connection) in _workers)
foreach (var (_, connection) in _supportedAgentTypes)
{
tasks.Add(this.SendMessageAsync(connection, evt, default));

tasks.Add(this.SendMessageAsync((IConnection)connection[0], evt, default));
}
await Task.WhenAll(tasks).ConfigureAwait(false);
}
Expand Down

0 comments on commit ca06721

Please sign in to comment.