Skip to content

Commit

Permalink
Fixed race condition on closed transaction
Browse files Browse the repository at this point in the history
  • Loading branch information
mortenson committed Jun 29, 2024
1 parent ba9f481 commit 2616f79
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/ripoff/ripoff.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func main() {
}
defer func() {
err = tx.Rollback(ctx)
if err != nil {
if err != pgx.ErrTxClosed {
slog.Error("Could not rollback transaction", errAttr(err))
os.Exit(1)
}
Expand Down

0 comments on commit 2616f79

Please sign in to comment.