go/src/database/sql
Daniel Theophanes f7df55d174 database/sql: do not leak the connectionResetter goroutine
Before terminating the connectionResetter goroutine the connection
pool processes all of the connections on the channel to unlock the
driverConn instances so everthing can shutdown cleanly. However
the channel was never closed so the goroutine hangs on the range.
Close the channel prior to ranging over it. Also prevent additional
connections from being sent to the resetter after the connection
pool has been closed.

Fixes #22699

Change-Id: I440d2b13cbedec2e04621557f5bd0b1526933dd7
Reviewed-on: https://go-review.googlesource.com/77390
Run-TryBot: Daniel Theophanes <kardianos@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-11-14 00:25:42 +00:00
..
driver database/sql: add driver.ResetSessioner and add pool support 2017-10-24 21:37:46 +00:00
convert.go database/sql: scan into *time.Time without reflection 2017-10-25 19:29:16 +00:00
convert_test.go all: change github.com issue links to golang.org 2017-11-04 04:13:41 +00:00
ctxutil.go database/sql: allow drivers to only implement Context variants 2017-10-24 16:51:29 +00:00
doc.txt database/sql: fix outdated package name in doc.txt 2017-06-30 19:11:17 +00:00
example_test.go all: minor vet fixes 2016-10-24 17:27:37 +00:00
fakedb_test.go database/sql: ensure all driver interfaces are called under single lock 2017-10-25 17:21:58 +00:00
sql.go database/sql: do not leak the connectionResetter goroutine 2017-11-14 00:25:42 +00:00
sql_test.go database/sql: ensure all driver interfaces are called under single lock 2017-10-25 17:21:58 +00:00