Skip to content

Commit

Permalink
fixbug:ping should put resource back to the pool
Browse files Browse the repository at this point in the history
  • Loading branch information
wybrobin committed May 20, 2022
1 parent f798737 commit 94c29b2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/sql/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,7 @@ func (db *DB) ping() (err error) {
if err != nil {
return err
}
defer db.pool.Put(r)
conn := r.(*driver.BackendConnection)
err = conn.Ping(context.Background())
return
Expand Down

0 comments on commit 94c29b2

Please sign in to comment.