mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-02 03:27:54 +00:00
secrets/database: fixes external plugin reconnect after shutdown for v4 and v5 interface (#12087)
* secrets/database: fixes external plugin shutdown reconnect for v5 interface * adds changelog entry * fixes handling of plugin shutdown for password generation on v4 interface
This commit is contained in:
@@ -315,7 +315,7 @@ func (b *databaseBackend) clearConnection(name string) error {
|
||||
func (b *databaseBackend) CloseIfShutdown(db *dbPluginInstance, err error) {
|
||||
// Plugin has shutdown, close it so next call can reconnect.
|
||||
switch err {
|
||||
case rpc.ErrShutdown, v4.ErrPluginShutdown:
|
||||
case rpc.ErrShutdown, v4.ErrPluginShutdown, v5.ErrPluginShutdown:
|
||||
// Put this in a goroutine so that requests can run with the read or write lock
|
||||
// and simply defer the unlock. Since we are attaching the instance and matching
|
||||
// the id in the connection map, we can safely do this.
|
||||
|
||||
Reference in New Issue
Block a user