mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-12 10:55:51 +02:00
fix goroutine and memory leak
This commit is contained in:
parent
61496e3727
commit
40fcebbaae
3 changed files with 23 additions and 19 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue