mirror of
https://github.com/weaveworks/scope.git
synced 2026-05-06 01:08:03 +00:00
merger: Fix a pointer bug that trashed the merge process
Turns out that when iterating in go, &loop_var is the same address every time
This commit is contained in:
@@ -49,8 +49,8 @@ func (smartMerger) Merge(reports []report.Report) report.Report {
|
||||
return reports[0]
|
||||
}
|
||||
c := make(chan *report.Report, l)
|
||||
for _, r := range reports {
|
||||
c <- &r
|
||||
for i := range reports {
|
||||
c <- &reports[i]
|
||||
}
|
||||
for ; l > 1; l-- {
|
||||
go func(left, right *report.Report) {
|
||||
|
||||
Reference in New Issue
Block a user