fixes anacrolix/torrent#795 (#807)
This commit is contained in:
parent
56c8b396f5
commit
e6a38b1cd1
|
@ -8,9 +8,11 @@ func (t *Torrent) updatePieceRequestOrder(pieceIndex int) {
|
|||
if t.storage == nil {
|
||||
return
|
||||
}
|
||||
t.cl.pieceRequestOrder[t.clientPieceRequestOrderKey()].Update(
|
||||
t.pieceRequestOrderKey(pieceIndex),
|
||||
t.requestStrategyPieceOrderState(pieceIndex))
|
||||
if ro, ok := t.cl.pieceRequestOrder[t.clientPieceRequestOrderKey()]; ok {
|
||||
ro.Update(
|
||||
t.pieceRequestOrderKey(pieceIndex),
|
||||
t.requestStrategyPieceOrderState(pieceIndex))
|
||||
}
|
||||
}
|
||||
|
||||
func (t *Torrent) clientPieceRequestOrderKey() interface{} {
|
||||
|
|
Loading…
Reference in New Issue