mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 21:46:11 +05:00
fix lock
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user