Remove double lock
This commit is contained in:
parent
c959882b93
commit
919155ab12
|
@ -105,11 +105,7 @@ type cassandraConnectionProducer struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *cassandraConnectionProducer) connection() (interface{}, error) {
|
func (c *cassandraConnectionProducer) connection() (interface{}, error) {
|
||||||
// Grab the write lock
|
// If we already have a DB, return it
|
||||||
c.Lock()
|
|
||||||
defer c.Unlock()
|
|
||||||
|
|
||||||
// If we already have a DB, we got it!
|
|
||||||
if c.session != nil {
|
if c.session != nil {
|
||||||
return c.session, nil
|
return c.session, nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue