aboutsummaryrefslogtreecommitdiff
path: root/weed/filesys/filehandle.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2020-12-08 22:26:46 -0800
committerChris Lu <chris.lu@gmail.com>2020-12-08 22:26:46 -0800
commit8e78187a975ef6f554905e0c7128a011f5d908eb (patch)
tree8dc628653648d614743528ef1c9ff38b6ae59af5 /weed/filesys/filehandle.go
parent900d22c6eca41533de88f95ff84f56754517527b (diff)
downloadseaweedfs-8e78187a975ef6f554905e0c7128a011f5d908eb.tar.xz
seaweedfs-8e78187a975ef6f554905e0c7128a011f5d908eb.zip
add back last read chunk cache to reader and properly close the reader
Diffstat (limited to 'weed/filesys/filehandle.go')
-rw-r--r--weed/filesys/filehandle.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/weed/filesys/filehandle.go b/weed/filesys/filehandle.go
index abe77f063..b70d90f6c 100644
--- a/weed/filesys/filehandle.go
+++ b/weed/filesys/filehandle.go
@@ -202,6 +202,9 @@ func (fh *FileHandle) Release(ctx context.Context, req *fuse.ReleaseRequest) err
}
fh.f.wfs.ReleaseHandle(fh.f.fullpath(), fuse.HandleID(fh.handle))
+ if closer, ok := fh.f.reader.(io.Closer); ok {
+ closer.Close()
+ }
}
return nil