Skip to content

Commit

Permalink
Merge pull request #45 from Kuadrant/fix_topology_all_race
Browse files Browse the repository at this point in the history
fix: topology all can cause race
  • Loading branch information
mikenairn authored Oct 24, 2024
2 parents 0cb371b + d87b3ad commit 66e1e50
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion machinery/topology.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,10 @@ func (t *Topology) Objects() *collection[Object] {

// All returns all object nodes in the topology.
func (t *Topology) All() *collection[Object] {
allObjects := t.objects
allObjects := map[string]Object{}
for k, v := range t.objects {
allObjects[k] = v
}
for k, v := range t.targetables {
allObjects[k] = v
}
Expand Down

0 comments on commit 66e1e50

Please sign in to comment.