Stop iterating pieces when storage is exhausted
This commit is contained in:
parent
135f21fb64
commit
8025d15155
@ -88,7 +88,7 @@ func GetRequestablePieces(input Input, pro *PieceRequestOrder, f func(ih metainf
|
||||
pieceLength := t.PieceLength()
|
||||
if storageLeft != nil {
|
||||
if *storageLeft < pieceLength {
|
||||
return true
|
||||
return false
|
||||
}
|
||||
*storageLeft -= pieceLength
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user