Add f.close for the opend file

This commit is contained in:
SongRuixia 2017-02-24 16:18:22 +08:00
parent 8e13ee01d6
commit 6b1cf1d71c

View File

@ -141,6 +141,7 @@ func (d *CachedDiscoveryClient) getCachedFile(filename string) ([]byte, error) {
if err != nil {
return nil, err
}
defer file.Close()
fileInfo, err := file.Stat()
if err != nil {