Count connections closed in putConn

This commit is contained in:
Colin 2020-04-21 23:37:35 -07:00
parent 718708bcb3
commit 0f205ede43
1 changed files with 1 additions and 0 deletions

View File

@ -1357,6 +1357,7 @@ func (db *DB) putConn(dc *driverConn, err error, resetSession bool) {
}
if err != driver.ErrBadConn && dc.expired(db.maxLifetime) {
db.maxLifetimeClosed++
err = driver.ErrBadConn
}
if debugGetPut {