Use MulticastGroup as map key and serialize under lock
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
3
dante.go
3
dante.go
@@ -103,10 +103,9 @@ func (n *Nodes) GetDanteTxDeviceInGroup(groupIP net.IP) *Node {
|
||||
defer n.mu.RUnlock()
|
||||
|
||||
group := ParseMulticastGroup(groupIP)
|
||||
groupKey := group.String()
|
||||
for _, node := range n.nodes {
|
||||
if node.DanteTxChannels != "" && node.MulticastGroups != nil {
|
||||
if _, exists := node.MulticastGroups[groupKey]; exists {
|
||||
if _, exists := node.MulticastGroups[group]; exists {
|
||||
return node
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user