]> Cypherpunks repositories - gostls13.git/commit
database/sql: add SetConnMaxIdleTime
authorDaniel Theophanes <kardianos@gmail.com>
Mon, 29 Oct 2018 16:09:21 +0000 (09:09 -0700)
committerDaniel Theophanes <kardianos@gmail.com>
Fri, 21 Feb 2020 18:36:57 +0000 (18:36 +0000)
commit6c61a57cfc24d344529685977855341ae9f17239
treedb08bf5591bd720ed987855da8398528db0de92a
parent753011ebc3228d68b7593e153f8d118f103c4748
database/sql: add SetConnMaxIdleTime

Allow removing a connection from the connection pool after
it has been idle for a period of time, without regard to the
total lifespan of the connection.

Fixes #25232

Change-Id: Icff157b906769a2d2d45c67525e04a72feb8d832
Reviewed-on: https://go-review.googlesource.com/c/go/+/145758
Run-TryBot: Daniel Theophanes <kardianos@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/database/sql/sql.go
src/database/sql/sql_test.go