mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 21:46:11 +05:00
release pieces on torrent drop
This commit is contained in:
@@ -90,6 +90,9 @@ func (c *Cache) Piece(m metainfo.Piece) storage.PieceImpl {
|
||||
func (c *Cache) Close() error {
|
||||
log.TLogln("Close cache for:", c.hash)
|
||||
delete(c.storage.caches, c.hash)
|
||||
for _, v := range c.pieces {
|
||||
v.Release()
|
||||
}
|
||||
c.pieces = nil
|
||||
|
||||
c.muReaders.Lock()
|
||||
|
||||
Reference in New Issue
Block a user