Skip to content

Commit

Permalink
leveldb: implement code review suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
postables committed May 9, 2020
1 parent cc52fd8 commit 4d57573
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions leveldb/datastore.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,7 @@ func (d *Datastore) DiskUsage() (du uint64, err error) {

// Close shuts down leveldb
func (d *Datastore) Close() (err error) {
if d.closed.Load() {
err = ErrClosed
}
err = ErrClosed
d.close.Do(func() {
d.closeLock.Lock()
err = d.db.Close()
Expand Down

0 comments on commit 4d57573

Please sign in to comment.