Browse Source

avoid nil when closing an index

fix https://github.com/chrislusf/seaweedfs/issues/1870
pull/1879/head
Chris Lu 4 years ago
parent
commit
726edab054
  1. 4
      weed/storage/needle_map_sorted_file.go

4
weed/storage/needle_map_sorted_file.go

@ -94,9 +94,13 @@ func (m *SortedFileNeedleMap) Delete(key NeedleId, offset Offset) error {
}
func (m *SortedFileNeedleMap) Close() {
if m.indexFile != nil {
m.indexFile.Close()
}
if m.dbFile != nil {
m.dbFile.Close()
}
}
func (m *SortedFileNeedleMap) Destroy() error {
m.Close()

Loading…
Cancel
Save