Commit 9371babd authored by Marko Tiikkaja's avatar Marko Tiikkaja Committed by Brad Fitzpatrick

database/sql: Remove unnecessary call to maybeOpenNewConnections

numCanOpen will never be larger than 0 in maybeOpenNewConnections() when this
code path is taken, so no new connections can ever be opened.

Change-Id: Id1302e8d9afb3a67be61b5e738fe07ef81d20fe0
Reviewed-on: https://go-review.googlesource.com/1550Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 04cf881f
......@@ -644,7 +644,6 @@ func (db *DB) conn() (*driverConn, error) {
// connectionOpener doesn't block while waiting for the req to be read.
req := make(chan connRequest, 1)
db.connRequests = append(db.connRequests, req)
db.maybeOpenNewConnections()
db.mu.Unlock()
ret := <-req
return ret.conn, ret.err
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment