New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
database/sql: close Rows if Conn is closed #33938
Comments
/cc @bradfitz @kardianos |
Cause:
I'm not sure this is a problem, much less fixable. maybe Conn.Close could ensure any rows are also closed. |
... until your unit tests mysteriously stop working (and don't report deadlock because of httptest.Server running in parallel).
Another approach might be to include some stronger wording in the documentation. Instead of
maybe
|
@Drahflow: Just a suggestion. Why use context which is never canceled? It can be used to clean up any pending
https://play.golang.org/p/ZH0A-c8VKB_y
That's what contexts can be used for. You can also set fixed timeouts in your unit tests with |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Reproduces on play.golang.org
What did you do?
https://play.golang.org/p/jMMhYBt-K9T
I have also locally tested it with https://godoc.org/github.com/lib/pq, same result.
What did you expect to see?
"Hello, playground"
What did you see instead?
The text was updated successfully, but these errors were encountered: