Fix bug where id not existing in multiplexing map causes panic (#16094)
* multiplexing: guard against connection panic * changelog * Update vault/plugin_catalog.go Co-authored-by: Calvin Leung Huang <1883212+calvn@users.noreply.github.com> Co-authored-by: Calvin Leung Huang <1883212+calvn@users.noreply.github.com>
This commit is contained in:
parent
7f6e281893
commit
f957573108
|
@ -0,0 +1,3 @@
|
|||
```release-note:bug
|
||||
plugin/multiplexing: Fix panic when id doesn't exist in connection map
|
||||
```
|
|
@ -157,7 +157,10 @@ func (c *PluginCatalog) cleanupExternalPlugin(name, id string) error {
|
|||
return fmt.Errorf("plugin client not found")
|
||||
}
|
||||
|
||||
pc := extPlugin.connections[id]
|
||||
pc, ok := extPlugin.connections[id]
|
||||
if !ok {
|
||||
return fmt.Errorf("plugin connection not found")
|
||||
}
|
||||
|
||||
delete(extPlugin.connections, id)
|
||||
if !extPlugin.multiplexingSupport {
|
||||
|
|
Loading…
Reference in New Issue