fix cache

This commit is contained in:
YouROK
2021-05-05 22:09:34 +03:00
parent 49f026401a
commit 7971bd79f1

View File

@@ -206,11 +206,7 @@ func (c *Cache) getRemPieces() []*Piece {
}
for r, _ := range c.readers {
notLoadSize := int64(FileRangeNotDelete)
if c.pieceLength > notLoadSize {
notLoadSize = c.pieceLength
}
if r.offset-r.file.Offset() < notLoadSize {
if c.isIdInFileBE(ranges, r.getReaderPiece()) {
continue
}
pc := r.getReaderPiece()