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:
parent
718708bcb3
commit
0f205ede43
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user