Skip to content

Commit

Permalink
lock metaLock in Close
Browse files Browse the repository at this point in the history
  • Loading branch information
Preetam committed Apr 30, 2017
1 parent 138f7c6 commit ed672fe
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lm2.go
Original file line number Diff line number Diff line change
Expand Up @@ -825,6 +825,8 @@ func (c *Collection) sync() error {

// Close closes a collection and all of its resources.
func (c *Collection) Close() {
c.metaLock.Lock()
defer c.metaLock.Unlock()
c.f.Close()
c.wal.Close()
c.cache.close()
Expand Down

0 comments on commit ed672fe

Please sign in to comment.