mirror of
https://github.com/hashicorp/vault.git
synced 2026-05-05 04:16:31 +02:00
Revert grabbing lock in database Connection funcs
This commit is contained in:
parent
f9f64572f5
commit
8c4f369e50
@ -116,9 +116,6 @@ func (c *cassandraConnectionProducer) Initialize(ctx context.Context, conf map[s
|
||||
}
|
||||
|
||||
func (c *cassandraConnectionProducer) Connection(_ context.Context) (interface{}, error) {
|
||||
c.Lock()
|
||||
defer c.Unlock()
|
||||
|
||||
if !c.Initialized {
|
||||
return nil, connutil.ErrNotInitialized
|
||||
}
|
||||
|
||||
@ -90,9 +90,6 @@ func (c *mongoDBConnectionProducer) Initialize(ctx context.Context, conf map[str
|
||||
|
||||
// Connection creates a database connection.
|
||||
func (c *mongoDBConnectionProducer) Connection(_ context.Context) (interface{}, error) {
|
||||
c.Lock()
|
||||
defer c.Unlock()
|
||||
|
||||
if !c.Initialized {
|
||||
return nil, connutil.ErrNotInitialized
|
||||
}
|
||||
|
||||
@ -76,9 +76,6 @@ 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