From 919155ab12855a483416ca3ac4f3d42aea3c3de7 Mon Sep 17 00:00:00 2001 From: Brian Kassouf Date: Tue, 7 Mar 2017 15:33:05 -0800 Subject: [PATCH] Remove double lock --- builtin/logical/database/dbs/connectionproducer.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/builtin/logical/database/dbs/connectionproducer.go b/builtin/logical/database/dbs/connectionproducer.go index 268ab615c..82da37cc7 100644 --- a/builtin/logical/database/dbs/connectionproducer.go +++ b/builtin/logical/database/dbs/connectionproducer.go @@ -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 }