Skip to content

Commit

Permalink
fix(MulticastClient): wait for the message to be sent to all interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
richardschneider committed Dec 14, 2018
1 parent 0e43ca3 commit e358a8d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ service or service instance.
- Supports IPv6 and IPv4 platforms
- CI on Circle (Debian GNU/Linux), Travis (Ubuntu Xenial and OSX) and AppVeyor (Windows Server 2016)
- Detects new and/or removed network interfaces
- Supports multicasting on multiple network interfaces

## Getting started

Expand Down
2 changes: 1 addition & 1 deletion src/MulticastClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public MulticastClient(IPEndPoint multicastEndpoint, IEnumerable<NetworkInterfac

public async Task SendAsync(byte[] message)
{
await Task.WhenAny(senders.Select(x => x.Value.SendAsync(message, message.Length, multicastEndpoint))).ConfigureAwait(false);
await Task.WhenAll(senders.Select(x => x.Value.SendAsync(message, message.Length, multicastEndpoint))).ConfigureAwait(false);
}

public void Receive(Action<UdpReceiveResult> callback)
Expand Down

0 comments on commit e358a8d

Please # to comment.