mirror of
https://github.com/turbot/steampipe.git
synced 2026-03-22 10:00:23 -04:00
* Add test demonstrating bug #4784 - OnConnectionConfigChanged panics with nil pool 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * Fix #4784: Add nil pool check in handlePluginInstanceChanges 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -27,6 +27,12 @@ func (m *PluginManager) handlePluginInstanceChanges(ctx context.Context, newPlug
|
||||
// update connectionConfigMap
|
||||
m.plugins = newPlugins
|
||||
|
||||
// if pool is nil, we're in a test environment or the plugin manager hasn't been fully initialized
|
||||
// in this case, we can't repopulate the plugin table, so just return early
|
||||
if m.pool == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
// repopulate the plugin table
|
||||
conn, err := m.pool.Acquire(ctx)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user