mirror of
https://github.com/turbot/steampipe.git
synced 2025-12-19 18:12:43 -05:00
* Unskip test demonstrating bug #4805: Concurrent read and close may race Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * Fix #4805: Add synchronization for concurrent StreamRow and Close The sync.Once in Close() only prevents multiple Close() calls, but doesn't coordinate with StreamRow() operations. Added a mutex and closed flag to prevent race conditions when one goroutine streams rows while another closes the result. The fix: - Added mutex (mu) and closed flag to Result struct - StreamRow checks closed flag before streaming (with RLock) - Close sets closed flag (with Lock) before closing channel This prevents "send on closed channel" panics and data races. Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>