mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-20 06:07:58 +08:00
avoid nil when closing an index
fix https://github.com/chrislusf/seaweedfs/issues/1870
This commit is contained in:
@@ -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()
|
||||
|
Reference in New Issue
Block a user