Mercurial > gemma
diff pkg/auth/connection.go @ 486:b2dc9c2f69e0 metamorph-for-all
First stab to use the metamorphic db to do all database stuff.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Fri, 24 Aug 2018 13:56:06 +0200 |
parents | c1047fd04a3a |
children | 8a0737aa6ab6 |
line wrap: on
line diff
--- a/pkg/auth/connection.go Fri Aug 24 12:14:56 2018 +0200 +++ b/pkg/auth/connection.go Fri Aug 24 13:56:06 2018 +0200 @@ -1,10 +1,8 @@ package auth import ( - "database/sql" "errors" "io" - "log" "sync" "time" @@ -21,9 +19,7 @@ type Connection struct { session *Session - access time.Time - db *sql.DB - refCount int + access time.Time mu sync.Mutex } @@ -90,10 +86,4 @@ } func (c *Connection) close() { - if c.db != nil { - if err := c.db.Close(); err != nil { - log.Printf("warn: %v\n", err) - } - c.db = nil - } }