]> Cypherpunks.ru repositories - gostls13.git/commit
database/sql: document Connect and Close may need a timeout
authorDaniel Theophanes <kardianos@gmail.com>
Tue, 28 Apr 2020 14:31:12 +0000 (07:31 -0700)
committerDaniel Theophanes <kardianos@gmail.com>
Tue, 28 Apr 2020 20:42:02 +0000 (20:42 +0000)
commitca854f3cdaa577930b385b61571d5176193b738e
tree7868afeef33b9dead65d4be6f5a4b1f658723ed3
parente1937251847bce7f6ccc149dfd64b34152588fce
database/sql: document Connect and Close may need a timeout

Opening a connection with Connect should still create a derived
context with a timeout because some clients will not use a timeout
and the connection pool may open a connection asynchronously.

Likewise, if a connection close makes a network operation it should
provide some type of sane timeout for the operation.

Fixes #38185

Change-Id: I9b7ce2996c81c486170dcc84b12672a99610fa27
Reviewed-on: https://go-review.googlesource.com/c/go/+/230438
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
src/database/sql/driver/driver.go