Skip to content

Commit 877603e

Browse files
authored
Ensure pool mutex is locked in GetAllCheckers (#1169)
1 parent d929df4 commit 877603e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

internal/project/checkerpool.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,9 @@ func (p *checkerPool) Files(checker *checker.Checker) iter.Seq[*ast.SourceFile]
8787
}
8888

8989
func (p *checkerPool) GetAllCheckers(ctx context.Context) ([]*checker.Checker, func()) {
90+
p.mu.Lock()
91+
defer p.mu.Unlock()
92+
9093
requestID := core.GetRequestID(ctx)
9194
if requestID == "" {
9295
panic("cannot call GetAllCheckers on a project.checkerPool without a request ID")

0 commit comments

Comments
 (0)