Skip to content

Commit

Permalink
db: release connection when done
Browse files Browse the repository at this point in the history
  • Loading branch information
redbaron committed Jul 18, 2023
1 parent bf7494f commit d0b8532
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions server/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ func ExecuteRetryablePgConn(ctx context.Context, db *sql.DB, fn func(conn *pgx.C
if err != nil {
return err
}
defer c.Close()
return c.Raw(func(dc any) error {
conn := dc.(*stdlib.Conn).Conn()
retry:
Expand Down

0 comments on commit d0b8532

Please sign in to comment.