Skip to content

Commit e101f0c

Browse files
committed
Ensure prerunner termination
1 parent f32315f commit e101f0c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

internal/arduino/builder/internal/detector/detector.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,7 @@ func (l *SketchLibrariesDetector) findIncludes(
335335
for _, sourceFile := range *sourceFileQueue {
336336
l.preRunner.Enqueue(l.gccPreprocessTask(sourceFile, buildProperties))
337337
}
338+
defer l.preRunner.Cancel()
338339
}
339340
}
340341

@@ -432,7 +433,7 @@ func (l *SketchLibrariesDetector) findMissingIncludesInCompilationUnit(
432433
if l.preRunner != nil {
433434
preRunner := l.preRunner
434435
l.preRunner = nil
435-
go preRunner.Cancel()
436+
preRunner.Cancel()
436437
}
437438

438439
// Run the actual preprocessor

0 commit comments

Comments
 (0)