-
Notifications
You must be signed in to change notification settings - Fork 18k
database/sql: with gopgsqldriver Keep-Alive DoS: *db.Query Rows.Close() is not automatic #2624
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
Labels
Milestone
Comments
The actual Git repository is at https://github.com/jbarham/gopgsqldriver, sorry. |
The actual Git repository is at https://github.com/jbarham/gopgsqldriver, although name of the package is pgsqldriver. |
This fixes the problem with no observable side effects: diff -r 4a8268927758 src/pkg/exp/sql/sql.go --- a/src/pkg/exp/sql/sql.go Fri Dec 23 14:28:01 2011 +1100 +++ b/src/pkg/exp/sql/sql.go Wed Dec 28 11:23:45 2011 +0100 @@ -726,6 +726,9 @@ rs.lastcols = make([]interface{}, len(rs.rowsi.Columns())) } rs.lasterr = rs.rowsi.Next(rs.lastcols) + if rs.lasterr == io.EOF { + rs.Close() + } return rs.lasterr == nil } |
Owner changed to @bradfitz. Status changed to Accepted. |
This issue was closed by revision 4435c8b. Status changed to Fixed. |
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The text was updated successfully, but these errors were encountered: