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) {
|
||||
// Grab the write lock
|
||||
c.Lock()
|
||||
defer c.Unlock()
|
||||
|
||||
// If we already have a DB, we got it!
|
||||
// If we already have a DB, return it
|
||||
if c.session != nil {
|
||||
return c.session, nil
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue