mirror of
https://github.com/turbot/steampipe.git
synced 2026-03-21 07:00:11 -04:00
Fixes issue #4790 where StreamRow() could panic with "send on closed channel" when called concurrently with Close(). Solution: - Added atomic.Bool closed flag to track Result state - StreamRow() checks closed flag before sending to prevent most races - Added defer/recover to gracefully handle edge case where Close() occurs between check and send - Rows sent after close are silently dropped (safe behavior) This approach avoids deadlocks by not holding locks during channel send operations, while using atomic operations for coordination. Test now passes consistently without panics. Fixes #4790 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>