Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions plugins/vault-plugin-secrets-hashicups/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,13 @@ func (b *hashiCupsBackend) getClient(ctx context.Context, s logical.Storage) (*h
b.lock.Lock()
unlockFunc = b.lock.Unlock

// Check if another goroutine created clients between RUnlock() and Lock() above
if b.client != nil {
return b.client, nil
}

// create b.client and return

return nil, fmt.Errorf("need to return client")
}

Expand Down