• Daniel Theophanes's avatar
    database/sql: do not leak the connectionResetter goroutine · f7df55d1
    Daniel Theophanes authored
    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: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
    f7df55d1
Name
Last commit
Last update
..
driver Loading commit data...
convert.go Loading commit data...
convert_test.go Loading commit data...
ctxutil.go Loading commit data...
doc.txt Loading commit data...
example_test.go Loading commit data...
fakedb_test.go Loading commit data...
sql.go Loading commit data...
sql_test.go Loading commit data...