diff --git a/server/torr/storage/torrstor/cache.go b/server/torr/storage/torrstor/cache.go index a2258d5..a480ca8 100644 --- a/server/torr/storage/torrstor/cache.go +++ b/server/torr/storage/torrstor/cache.go @@ -194,12 +194,10 @@ func (c *Cache) cleanPieces() { c.removePiece(p) rems-- if rems <= 0 { - break + utils.FreeOSMemGC() + return } } - if rems <= 0 { - utils.FreeOSMemGC() - } } }