fix goroutine and memory leak

This commit is contained in:
0xJacky 2022-06-13 00:29:52 +08:00
parent 61496e3727
commit 40fcebbaae
3 changed files with 23 additions and 19 deletions

View file

@ -59,7 +59,8 @@ type serverFileSystemType struct {
}
func (f serverFileSystemType) Exists(prefix string, _path string) bool {
_, err := f.Open(path.Join(prefix, _path))
file, err := f.Open(path.Join(prefix, _path))
defer file.Close()
return err == nil
}