Skip to content

Commit 412ca49

Browse files
authored
Merge pull request #7963 from henry118/gc-bug
use local variable for rt when iterating collectors
2 parents 6044313 + b9bd10c commit 412ca49

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

metadata/gc.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ func startGCContext(ctx context.Context, collectors map[gc.ResourceType]Collecto
141141
if len(collectors) > 0 {
142142
contexts = map[gc.ResourceType]CollectionContext{}
143143
for rt, collector := range collectors {
144+
rt := rt
144145
c, err := collector.StartCollection(ctx)
145146
if err != nil {
146147
// Only skipping this resource this round

0 commit comments

Comments
 (0)