Changes to the way piece prioritization affects the piece
This commit is contained in:
parent
21fb4933fc
commit
5b52769523
|
@ -344,9 +344,14 @@ func (cl *Client) prioritizePiece(t *torrent, piece int, priority piecePriority)
|
||||||
if t.havePiece(piece) {
|
if t.havePiece(piece) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if priority != PiecePriorityNone {
|
||||||
cl.queueFirstHash(t, piece)
|
cl.queueFirstHash(t, piece)
|
||||||
t.Pieces[piece].Priority = priority
|
}
|
||||||
|
p := t.Pieces[piece]
|
||||||
|
if p.Priority != priority {
|
||||||
|
p.Priority = priority
|
||||||
cl.pieceChanged(t, piece)
|
cl.pieceChanged(t, piece)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (cl *Client) setEnvBlocklist() (err error) {
|
func (cl *Client) setEnvBlocklist() (err error) {
|
||||||
|
|
Loading…
Reference in New Issue