Skip to content

Commit

Permalink
fix transaction rollback on process CRL
Browse files Browse the repository at this point in the history
  • Loading branch information
pimg committed Jul 20, 2024
1 parent e5e3330 commit adec55e
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions internal/adapter/db/certificate_revocation_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,7 @@ func (s *LibSqlStorage) SaveRevokedCertificates(ctx context.Context, revocationL
if err != nil {
return 0, err
}
defer func(tx *sql.Tx) {
err := tx.Rollback()
if err != nil {
log.Panicf("could not rollback transaction: %s", err)
}
}(tx)
defer tx.Rollback()

Check failure on line 121 in internal/adapter/db/certificate_revocation_list.go

View workflow job for this annotation

GitHub Actions / lint

Error return value of `tx.Rollback` is not checked (errcheck)

qtx := s.Queries.WithTx(tx)

Expand Down

0 comments on commit adec55e

Please sign in to comment.