Skip to content

fix race from leaked goroutine

Warren Gifford requested to merge cc/fix-race into main

Created by: camdencheek

We were leaking a goroutine in an optimization to move logging latency out of the critical path of streaming search, so this collects that goroutine while still allowing it to run concurrently. I added the waitgroup as part of the function signature to make it harder to misuse (as opposed to a return value that could be ignored).

Fixes https://github.com/sourcegraph/sourcegraph/issues/30426

Merge request reports

Loading