Files
steampipe/pkg
Nathan Wallace 9c3791fafd Fix #4809: Add nil checks for sessions map after Close() (rebased) (#4883)
* Add test for #4809: BeforeClose should handle nil sessions map

This test verifies that the BeforeClose callback checks if c.sessions map
has been nil'd by Close() before attempting to delete from it.

The test fails as expected without the fix, proving the bug exists.

Bug: #4809

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Fix #4809: Add nil check in BeforeClose for sessions map

Add nil check in BeforeClose callback before accessing c.sessions map.
This prevents panic when the callback executes after Close() has nil'd
the map.

Fixes #4809

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-11-16 10:53:39 -05:00
..