mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
avoid nil exception
fix https://github.com/chrislusf/seaweedfs/issues/1869
This commit is contained in:
parent
1bd880dcdb
commit
bdfed16d42
|
@ -152,8 +152,10 @@ func (m *LevelDbNeedleMap) Close() {
|
|||
glog.Warningf("close index file %s failed: %v", indexFileName, err)
|
||||
}
|
||||
|
||||
if err := m.db.Close(); err != nil {
|
||||
glog.Warningf("close levelDB failed: %v", err)
|
||||
if m.db != nil {
|
||||
if err := m.db.Close(); err != nil {
|
||||
glog.Warningf("close levelDB failed: %v", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue