Mercurial > gemma
changeset 129:ee5a3dd8e972
Forgot to check if a db connection is already close when closing idle db connections.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Thu, 28 Jun 2018 16:45:01 +0200 |
parents | 441a8ee637c5 |
children | 13b82701b1fb |
files | auth/connection.go |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/auth/connection.go Thu Jun 28 16:13:58 2018 +0200 +++ b/auth/connection.go Thu Jun 28 16:45:01 2018 +0200 @@ -61,7 +61,7 @@ func (cp *ConnectionPool) cleanDB() { valid := time.Now().Add(-maxDBIdle) for _, con := range cp.conns { - if con.access.Before(valid) { + if con.access.Before(valid) && con.db != nil { con.db.Close() con.db = nil }