1
0
mirror of https://github.com/golang/go synced 2024-11-23 18:50:05 -07:00

Count connections closed in putConn

This commit is contained in:
Colin 2020-04-21 23:37:35 -07:00
parent 718708bcb3
commit 0f205ede43

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 {