mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
Correct error check for child walk
This was checking another error not childErr -- which would skip child errors and cause issues. I haven't seen this in practice but found while debugging another issue.
This commit is contained in:
parent
a95115a6da
commit
f77a0e5aba
|
@ -357,7 +357,7 @@ func Walk(ctx context.Context, v Visitor, s *EvalStmt, node Node, path []Node, n
|
||||||
wg.Add(1)
|
wg.Add(1)
|
||||||
go func(i int, e Node) {
|
go func(i int, e Node) {
|
||||||
defer wg.Done()
|
defer wg.Done()
|
||||||
if childNode, childErr := Walk(ctx, v, s, e, append([]Node{}, path...), nr); err != nil {
|
if childNode, childErr := Walk(ctx, v, s, e, append([]Node{}, path...), nr); childErr != nil {
|
||||||
errs[i] = childErr
|
errs[i] = childErr
|
||||||
} else {
|
} else {
|
||||||
newChildren[i] = childNode
|
newChildren[i] = childNode
|
||||||
|
|
Loading…
Reference in a new issue