mirror of
https://github.com/hashicorp/vault.git
synced 2026-05-04 20:06:27 +02:00
Add lock to sql connection as well
This commit is contained in:
parent
28e8fd1ca7
commit
7ef59df0b2
@ -76,6 +76,9 @@ func (c *SQLConnectionProducer) Initialize(ctx context.Context, conf map[string]
|
||||
}
|
||||
|
||||
func (c *SQLConnectionProducer) Connection(ctx context.Context) (interface{}, error) {
|
||||
c.Lock()
|
||||
defer c.Unlock()
|
||||
|
||||
if !c.Initialized {
|
||||
return nil, ErrNotInitialized
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user