diff options
| author | Paul Buetow <paul@buetow.org> | 2026-05-13 10:30:29 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-05-13 10:30:29 +0300 |
| commit | 6d407096405520d5e157235e52773b9a4f3e4396 (patch) | |
| tree | 9d12467565769c02a62ff60518e19d94f5984f85 /internal/runtime/runtime.go | |
| parent | a21c653c9939ac82b181709dc745f017fb3b8a8a (diff) | |
fix: prevent goroutine leak in tuiTraceStarterFromRunTrace via done channel
Replace the buffered errCh (capacity 1) with an unbuffered channel plus a
dedicated done channel that is closed via defer when the outer function
returns for any reason (ctx cancellation, startedCh signal, or startup
error). The trace goroutine selects on both errCh and done when delivering
its result, guaranteeing it can always exit and is never left blocked
waiting on a channel that nobody will drain.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'internal/runtime/runtime.go')
0 files changed, 0 insertions, 0 deletions
