aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--weed/storage/volume_read_write.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/weed/storage/volume_read_write.go b/weed/storage/volume_read_write.go
index c30abf237..f28ee50e6 100644
--- a/weed/storage/volume_read_write.go
+++ b/weed/storage/volume_read_write.go
@@ -322,7 +322,7 @@ func (v *Volume) readNeedle(n *needle.Needle, readOption *ReadOption) (int, erro
if !n.HasLastModifiedDate() {
return bytesRead, nil
}
- if uint64(time.Now().Unix()) < n.LastModified+uint64(ttlMinutes*60) {
+ if time.Now().Before(time.Unix(0, int64(n.AppendAtNs)).Add(time.Duration(ttlMinutes) * time.Minute)) {
return bytesRead, nil
}
return -1, ErrorNotFound