mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-04-05 20:52:50 +08:00
avoid nil when closing an index
fix https://github.com/chrislusf/seaweedfs/issues/1870
This commit is contained in:
parent
bdfed16d42
commit
726edab054
@ -94,8 +94,12 @@ func (m *SortedFileNeedleMap) Delete(key NeedleId, offset Offset) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (m *SortedFileNeedleMap) Close() {
|
func (m *SortedFileNeedleMap) Close() {
|
||||||
m.indexFile.Close()
|
if m.indexFile != nil {
|
||||||
m.dbFile.Close()
|
m.indexFile.Close()
|
||||||
|
}
|
||||||
|
if m.dbFile != nil {
|
||||||
|
m.dbFile.Close()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *SortedFileNeedleMap) Destroy() error {
|
func (m *SortedFileNeedleMap) Destroy() error {
|
||||||
|
Loading…
Reference in New Issue
Block a user