diff --git a/server/torr/storage/torrstor/cache.go b/server/torr/storage/torrstor/cache.go index e128ef2..5a16480 100644 --- a/server/torr/storage/torrstor/cache.go +++ b/server/torr/storage/torrstor/cache.go @@ -263,7 +263,7 @@ func (c *Cache) setLoadPriority(ranges []Range) { readerPos := r.getReaderPiece() readerRAHPos := r.getReaderRAHPiece() end := r.getPiecesRange().End - count := settings.BTsets.ConnectionsLimit / c.Readers() // max concurrent loading blocks + count := settings.BTsets.ConnectionsLimit / len(c.readers) // max concurrent loading blocks limit := 0 for i := readerPos; i < end && limit < count; i++ { if !c.pieces[i].Complete {