Skip to content

Commit

Permalink
Update store/commitment/store.go
Browse files Browse the repository at this point in the history
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
  • Loading branch information
tuantran1702 and coderabbitai[bot] authored Apr 30, 2024
1 parent 7b0116e commit e45b71f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions store/commitment/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -399,9 +399,8 @@ loop:
if err := importer.Commit(); err != nil {
return snapshotstypes.SnapshotItem{}, fmt.Errorf("failed to commit importer: %w", err)
}
err := importer.Close()
if err != nil {
return snapshotstypes.SnapshotItem{}, err
if err := importer.Close(); err != nil {
return snapshotstypes.SnapshotItem{}, fmt.Errorf("failed to close importer: %w", err)
}
}

Expand Down

0 comments on commit e45b71f

Please sign in to comment.