Revert grabbing lock in database Connection funcs

This commit is contained in:
Jeff Mitchell 2017-12-19 12:53:21 -05:00
parent e6d60ee551
commit 7e033efa4c
3 changed files with 0 additions and 9 deletions

View file

@ -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
}

View file

@ -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
}

View file

@ -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
}