Skip to content

Commit

Permalink
fixbug:ping should put resource back to the pool (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
wybrobin committed May 21, 2022
1 parent 07de56e commit c1c7771
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 c1c7771

Please sign in to comment.