Skip to content

Commit

Permalink
Minor
Browse files Browse the repository at this point in the history
  • Loading branch information
patrick-dmxc committed Jan 27, 2024
1 parent 42366a7 commit e22a2ec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ArtNetSharp/Communication/AbstractInstance.cs
Original file line number Diff line number Diff line change
Expand Up @@ -526,14 +526,14 @@ public async Task SendArtRDM(RDMMessage rdmMessage)
if (!rdmMessage.Command.HasFlag(ERDM_Command.RESPONSE) && rdmMessage.SourceUID == RDMUID.Empty)
rdmMessage.SourceUID = UID;

RDMUID_ReceivedBag uidBag;
if (knownRDMUIDs.TryGetValue(rdmMessage.DestUID, out uidBag))
if (knownRDMUIDs.TryGetValue(rdmMessage.DestUID, out RDMUID_ReceivedBag uidBag))
rdmMessage.TransactionCounter = uidBag.NewTransactionNumber();

var ports = RemoteClientsPorts.Where(port => port.KnownRDMUIDs.Count != 0).Where(port => port.OutputPortAddress.HasValue && port.KnownRDMUIDs.Any(bag => bag.Uid == rdmMessage.DestUID)).ToList();
List<Task> tasks = new List<Task>();
foreach (var port in ports)
{
//Todo Buffer per IP address to prevent Hardware from overflow
ArtRDM artRDM = new ArtRDM(port.OutputPortAddress.Value, rdmMessage);
tasks.Add(Task.Run(async () => await TrySendPacket(artRDM, port.IpAddress)));
}
Expand Down

0 comments on commit e22a2ec

Please sign in to comment.