Skip to content

Commit

Permalink
remove add check
Browse files Browse the repository at this point in the history
  • Loading branch information
mh0lt committed May 26, 2024
1 parent 0d0b0d4 commit 3cc40a7
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions torrent-piece-request-order.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package torrent

import (
g "github.com/anacrolix/generics"
"github.com/anacrolix/log"
request_strategy "github.com/anacrolix/torrent/request-strategy"
)

Expand Down Expand Up @@ -62,16 +61,14 @@ func (t *Torrent) initPieceRequestOrder() {
}

func (t *Torrent) addRequestOrderPiece(i int) {
t.logger.Levelf(log.Debug, "%s: add ropiece: storage=%v cap=%v ignore", t.Name(), t.storage, t.hasStorageCap(), !t.ignorePieceForRequests(i))

if t.storage == nil {
return
}
pro := t.getPieceRequestOrder()
key := t.pieceRequestOrderKey(i)
if t.hasStorageCap() || !t.ignorePieceForRequests(i) {
pro.Add(key, t.requestStrategyPieceOrderState(i))
}
//if t.hasStorageCap() || !t.ignorePieceForRequests(i) {
pro.Add(key, t.requestStrategyPieceOrderState(i))
//}
}

func (t *Torrent) getPieceRequestOrder() *request_strategy.PieceRequestOrder {
Expand Down

0 comments on commit 3cc40a7

Please sign in to comment.