Remove double lock

This commit is contained in:
Brian Kassouf 2017-03-07 15:33:05 -08:00
parent c959882b93
commit 919155ab12

View file

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