close file in ScanVolumeFile()

fix https://github.com/chrislusf/seaweedfs/issues/761
This commit is contained in:
Chris Lu
2018-11-04 00:28:24 -07:00
parent 1fcbed4e90
commit f050b22d6c
3 changed files with 22 additions and 5 deletions

View File

@@ -193,6 +193,7 @@ func ScanVolumeFile(dirname string, collection string, id VolumeId,
if err = visitSuperBlock(v.SuperBlock); err != nil {
return fmt.Errorf("Failed to process volume %d super block: %v", id, err)
}
defer v.Close()
version := v.Version()